PhysX-like Trigger class

Lt.CYX

20-04-2007 16:30:16

dumb question, but I couldn't be sure from the topics I read. Is there a class in OgreNewt that's compatible with PhysX (NovodeX)'s Trigger class? I mean, just an area that has a callback when an object enters it and another when an object leaves it?

walaber

20-04-2007 17:24:32

it's not quite that simple, but you can use the ContactCallback system to do something very similar.

assume the 2 are not colliding every frame, and then if they do, set a flag inside the contactcallback. after calling update() on the World, you can check the flag for changes to see if something has entered or exited the area.