MV3D Development Blog

November 2, 2007

So simple, it must be right!

Filed under: Uncategorized — SirGolan @ 2:03 pm

I just figured out how to handle collisions between areas with separate coordinate systems. Give gateways their own physics space. Whenever a body gets near the gateway, it adds colliders in that space. After checking collisions in the area, all the bodies in the gateway space are translated through the gateway, and then the gateway space is checked for collisions against the gateway’s destination area. Then just translate the bodies back out of the gateway afterward. They’ll have all the correct collision info generated, and it should be a pretty quick collision detection. Changing the positions and back is a little annoying, but I really think this is the absolute best way to handle it.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress