Best way to solve position events?

toglia

16-04-2008 18:28:02

Now that I have solved all my collision problems, thanks to Betajaen´s technique of building complex meshes with a compound of simple convex shapes, I´m in need of creating events depending on certain bodies position.

I was thinking maybe I could use some collision event with no physic reaction, like a portal, that could somehow give me the exact body thats passing through it... Is that possible? and if its possible wouldn't it be a problem if the moving objects passes very fast, fast enough that it doesn't get detected, right?

I know I can grab the position on each body every frame but wouldn't that be expensive?

Thanks all.

betajaen

16-04-2008 18:34:17

You could try using intersections, but if the bodies must be in a specific pose then I suppose you would have to compare them every frame or at least every other frame. Sadly, I don't think there is a callback in PhysX for it.

toglia

18-04-2008 17:55:30

What I was looking for is called "trigger".

solved in here:
http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=6723

Took me seconds to implement after that!

Thanks!

betajaen

18-04-2008 23:35:55

Right. I thought you meant position as in a certain pose that the Actor may be; Facing up or to left, etc.