The region problem

Moderators: Trylon, Paradox

The region problem

Postby Trylon » Sat Nov 24, 2007 9:03 am

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.
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: The region problem

Postby Robert The Rebuilder » Sat Nov 24, 2007 6:06 pm

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.
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US


Return to Scripting Journal

Who is online

Users browsing this forum: No registered users and 1 guest