OgreNewt region management, multiple world instances?

Seraph

16-05-2006 12:33:41

hi all
I successfully integrate OgreNewt with PLSM2 , but there's a problem....
I have to call setWorldSize to fit the whole terrain size. but , you know , PLSM2 terrain can be quite large? so I want to manage the object-terrain collision by region or partitions. after looking into the OgreNewt API doc, it seems the World has no way to set its "origin"? so , I can't have multiple instance of isolated collision world , and make the collision world active only if the player is stepped into the world's region. I think this can save quite a bit computation time . can anybody give me some hints?

walaber

17-05-2006 00:57:41

the easiest way to do this would be to create a world-specific "offset", and apply that to all bodies in each world in a custom transform callback.... this would take the bodies from their "local" position relative to the Newton world, and put them in the overall global coordinates of the game world.

OvermindDL1

17-05-2006 23:36:12

That is what I did at first, but using a singuler large world again due to issues with getting the things in multiple worlds to interact when at the boundries...