Celest
24-09-2008 18:00:58
How can I convert or parsing exported ogremax scene into physics world (convex collision mesh)
According topic "Physics importer" (@
8180). I don't understand at all.
Could someone paste snippet code or any suggestion ?
Prophet
24-09-2008 18:32:02
If you know how Ogre Max works, then use the class PhysicsCallback in the Loader-files to create a callback.
To export correct data use something like this in Objects Settings...->User Data:
Box01;Box01.mesh
Box; 10 10 10
mass: 10
This will create a body called Box01, assign the Box01.mesh-mesh to it, create a collision cube with the sides of 10 and it will have the mass of 10.
I'm writing a MaxScript which is 90 % complete, but I'm going away during this weekend and have no access to internet. If you can wait until sunday, I will have a better solution for you. (Sorry for the lacking information, I'm in a hurry)
Prophet
28-09-2008 22:41:16
Right, I'm done with the scripts. It's far from perfect, but it works, kinda.
Instructions:
1) Select all the
geometry in the scene which you want to apply physics to.
2) Run the Object.ms-script.
3) Go to the Modify-tab for each object and set the params accordingly, paying extra attention to collision model and Create Params. If you set a box-collision for a sphere, or vice versa, you will get an error (as a sphere don't have width and boxes don't have radius).
4) Run the Scene.ms-script.
5) Set the params to whatever fits and press the button.
Hope that helps! I'll also update the other thread. Please post things related to it there.
Download