Pick up the world and move it?

HexiDave

10-05-2007 06:48:18

Alright, I've got a project dealing with large terrain and at some point I need to say "ok, I'm too far from the origin, it's time to shift the origin." Now, I had problems compiling nxOgre's new version (and an older one =/), so I can't test this yet, but I figure I'd ask here:

If I need to take every single physics object and move them back a certain amount (just picking them up and setting a new position during 1 frame) will it cause a problem with the built up forces and such? I imagine this could cause problems with collisions in progress, so I assume I'd do this move at the end of the frame to let PhysX deal with everything first?

Any insight would be helpful here - I've gotten this to work plenty of times with geometry, but never did it much with physics models.

Thanks!

betajaen

10-05-2007 09:33:07

Moving a body using SetGlobalPosition whilst it is in motion shouldn't do anything to the momentum, but the sleeping ones would wake up.

Grom has been working on in the past on PLSM2 and NxOgre, which AFAIK moves the pages of terrain around (static bodies with terrainShapes attached).

So I would say; Yes it is possible.

HexiDave

10-05-2007 10:19:09

Groovy, thought I'd check with a resident physics guru before I continued spouting "Oh ya, it'll work perfectly!"

Thanks muchly!