NxWorld scale

daedar

23-05-2007 15:50:24

Hi,

I've just noticed that I've got world units 10 times bigger than the SI units in my 3D world. So the entire physic engine seems slower than expected (the objects falls 10 times slower).
I know that I'll need to scale my world so that it fits "classical" units (and that's what I'll do) but I was just wondering: is there any way to tell PhysX that I don't want to use SI units? what would be the result if I multiply by 10 the time elapsed in the frameStarted method? :?

Thanks

ghiboz

23-05-2007 15:52:03

Hi,

I've just noticed that I've got world units 10 times bigger than the SI units in my 3D world. So the entire physic engine seems slower than expected (the objects falls 10 times slower).
I know that I'll need to scale my world so that it fits "classical" units (and that's what I'll do) but I was just wondering: is there any way to tell PhysX that I don't want to use SI units? what would be the result if I multiply by 10 the time elapsed in the frameStarted method? :?

Thanks


i've scaled my objects:
http://www.ogre3d.org/phpBB2addons/view ... 5329#25329

daedar

23-05-2007 15:56:08

Yes I know I have to scale my object but that's not really the question. The question is: "Can we change the PhysX world units?".

Pottej

23-05-2007 16:05:22

I am presuming you will need to change the gravitational constant g to make it x10 bigger. I don't know if NxOgre is programmed such that this is an easy thing to do :)

If you were making a very big change to the world scale you would probably want to change the timestep of the integrator too. Again I don't know how PhysX does that, im just talking from other physics experience :oops:

betajaen

23-05-2007 16:12:35

No you can't change the units like that, and your object is falling exactly how it should.

If you want to change the gravitational constant, you can via the Scene Params:

mScene = mWorld->createScene("myScene", mSceneMgr, "floor: yes, gravity: 0 -20 0");

daedar

23-05-2007 16:29:54

and your object is falling exactly how it should

Yes but... if my world is 10x bigger than expected, when a physic mesh is falling of 10m/s for example, for me it look like it falls only by 1m/second. So even if they physically fall as expected, they graphically don't.

So I think I'll have to scale all my meshes and review my units :cry:

betajaen

23-05-2007 16:50:30

But shouldn't your meshes be scaled to the metres in the first place?

daedar

23-05-2007 17:07:49

But shouldn't your meshes be scaled to the metres in the first place?

Yes in fact everything is overscaled in my world, the meshes too. As you said I first have to scale the meshes to meters.