Page 1 of 1

The region problem

PostPosted: Sat Nov 24, 2007 9:03 am
by Trylon
After a bit of careful research in PyPRP's code, I found the core of our dreaded Region problem.

Befor I explain, you should know that the object that stores the physical info, is almost a direct copy of internal Havok Physics data, and thus has no relation to generic settings like coordinates and scale, that are set in other plasma objects.

Further, we have static physics objects (origin at 0,0,0 worldspace) used for generic collision, and dynamic physics objects (origin at objects center, and orientation set), used for kickables and most regions.

It turns out that the physics object has no concept of scale, but only center position and rotation. The PyPRP export by default didn't do anything with the vertices of dynamic physics objects, while it should have applied scale only.

Well, that's the story, I'm gonna try and fix it.

Re: The region problem

PostPosted: Sat Nov 24, 2007 6:06 pm
by Robert The Rebuilder
Trylon wrote:It turns out that the physics object has no concept of scale, but only center position and rotation. The PyPRP export by default didn't do anything with the vertices of dynamic physics objects, while it should have applied scale only.


I guess that's because Havok must represent the physics objects as a rigid body, meaning that it cannot change shape. ODE (the physics engine for Myst V, I believe) had the same restrictions. I had used ODE on a game engine for a previous job, and the only way we could scale rigid bodies in game was to destroy the old rigid body and create a larger/smaller one.

Good luck on the fixes, Trylon! Hope this will help Aloys' issues with instanced (not duplicated) collisions objects.