Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Block Collision : Some help ?

Discussion in 'Questions and Suggestions' started by Albino2, Sep 23, 2014.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Albino2 Trainee Engineer

    Messages:
    16
    After hours reading topics and trying everything I could think of, I still cant get collisions to work on my custom block and im asking for help.

    What im doing :
    -> Create visual mesh with sketchup
    -> Export as fbx
    -> Prepare the xml file
    -> run MwmBuilder.exe
    -> edit the cubeblocks file
    -> place the mwm in the appropriate mod folder
    -> test it : I can use the cube. Now I need the collision.

    -> from sketchup, export as obj
    -> open SoftImage ModTool 7.5
    -> Import model
    -> Create primitive polygon cube
    -> Havok toolbar : Create rigidbody
    -> Havok export : transform scene custom Matrix 1 0 0 / 0 0 -1 / 0 1 0 >>> create rigid bodies (default options) >>> Write to platform (default options)
    -> check the resulting file with Havok Tool
    -> get the hkt file in the mwmbuilder.exe folder, run it
    -> place the mwm in the appropriate mod folder
    -> test it : still the default cube collision. Sad face.
    No errors in the log.
    Ive seen in some topics and screenshots that you could diplay physics collisions, but so far I couldnt use this tool : neither shift alt F12 or the option in the F11 debug seems to show any physics collisions. However when I toggle "Model Dummies" a cube appear arround my block with the label "model".


    Anyone can guess what I am doing wrong ?
     
    Last edited by a moderator: Sep 23, 2014
  2. Albino2 Trainee Engineer

    Messages:
    16
    Ok I think I solved part of the problem : I was using a wrong version of Havok (right one is 2012.2.0) AND apparently you have to restart the game to reload the collisions (debug option "reload models" is not enough).

    Now to try to figure out how to place the collision geometry, I only get weird results. Its hard to tell without a way to visualize the collision volumes ingame :s
     
  3. darth_biomech Senior Engineer

    Messages:
    1,550
    Have you tried to press f11? There is an option for exactly that.
     
  4. Nilat Apprentice Engineer

    Messages:
    290
    He obviously did since he said:
    But then, you are right, this part is strange:
    since there is indeed an option for this (the last checkbox)

    Besides, yeah, sometimes you have to relaunch the game. Some things just arent updated when reloading.
    Usually, .sbc are perfectly reloaded. Models, I always restart.
     
    Last edited by a moderator: Sep 23, 2014
  5. Albino2 Trainee Engineer

    Messages:
    16
    Toggling the "Physics Primitives" option does nothing for me, appart from having a "Phantom" tag appear on a nearby gravity generator. No physics volume displayed anywhere - just tried on a new world too.

    As far as I can tell, my physics collision works, but any collision geometry is moved to the center on the cube. I've read something about origin position, but it was about 3DS or maya, and im using Mod Tools. I tried to check about that but couldnt find anything weird. Besides the object appears with the right offset in the Havok preview tool.
     
  6. darth_biomech Senior Engineer

    Messages:
    1,550
    (you can't see physmeshes? that's very strange...)
    There should be a pivot or something similar in mod tools program that you use... You need slide that in the center of global coordinates and reset it's rotations to zero, or else it will keep offsetting itself towards center.
     
  7. Albino2 Trainee Engineer

    Messages:
    16
    Ok, about the pivot thing I derped. I thought it had to be in the center of the collision object, not of the scene. This is corrected.
    However there is still a sensible offset in the actual collision. Its hard to tell how big it is since I cant see the collision, but its here.

    Edit:About the collisions not showing : I tried to change video parameters & other things, no success. Debug draw and Physics Primitives dont show anything at all except the label on the gravity generator.
     
    Last edited by a moderator: Sep 23, 2014
  8. Albino2 Trainee Engineer

    Messages:
    16
    I managed to get the physics displayed and solve my problems.
    Apparently some Nvidia parameter prevented the debug volumes from showing, set performance and parameters to default and its alright. Could see my collisions were twice the size they should be, set the scale to 0.5 and its now ok. :)
     
Thread Status:
This last post in this thread was made more than 31 days old.