Hi everyone,
I don't know really what is the best way to define a trigger box with BEPU. I try to play a music when a ball collide with this trigger box but no physic effect need to be computed.
I've try to define a "Box" Object and create my own method called on the "CreatingPair" event and my method modify the CollisionRule from Defer to NoBroadPhase.
It works but the sender collidable object is stopped for a few moments.
I think is not the best solution. Do you have any idea ?
Thank you in advance.
How i can define a trigger with BEPU
Re: How i can define a trigger with BEPU
Instead of modifying the collision rule from within the collision event, just set the trigger's personal collision rule to NoSolver at initialization. That way, all collisions will have the NoSolver rule without having to set it on the fly, and no collision response will take place. Colliding objects can still generate contacts under NoSolver, they just won't act as constraints.
Re: How i can define a trigger with BEPU
It works. Thanks !