Feature request: Scaling of shapes

spacegaier

06-07-2008 12:52:28

I've stepped through this thread (http://www.ogre3d.org/phpBB2addons/view ... light=unit) , which comes to the conclusion that you can't scale a shape after beeing created. But this would be really handy.

Imagine the situation of a cube that shall become bigger and bigger. I'm now able to scale the mesh (via the node), but this woun't affect the physics. Couldn't you implement a way to solve this, betajaen?

Regards - spacegaier

PS: Is AGEIA Physx able to scale the shape?

betajaen

06-07-2008 13:13:17

Yep, PhysX can do it.

Cube already has the "setDimensions" function, there is no reason why it can't be copied/modified to the other primitives. Convex/Triangle/Heightfields would require re-cooking though, something you really don't want to do in mid-frame. But apart from Convex you wouldn't rescale them anyway.

spacegaier

06-07-2008 13:25:02

What do you mean by mid-frame?

betajaen

06-07-2008 13:35:18

Cooking an average sized triangle mesh takes almost a second to complete. If you have an average frame rate of 60, and you suddenly start cooking meshes then your frame rate is going to drop to almost nothing. This is why every serious game developer pre-cooks their physics meshes.