disable rigid body

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
sueds
Posts: 43
Joined: Tue Feb 05, 2008 10:40 am

disable rigid body

Post by sueds »

hello,

is there a way to disable the rigid body but keep the collision detection ? I mean a function to assign to a entity ?


cheers
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: disable rigid body

Post by Norbo »

If you want to disable the physically based movement but keep both detection and response, you can use (Entity).makeNonDynamic(). If you want to get rid of response but keep creating controllers when objects get close to each other, you can use (Entity).isTangible = false. While an object is intangible, it will not perform rigorous collision detection (such as identifying contact points and whether or not the objects are actually in collision). If you want to still perform these sorts of functions with this intangible 'detector' object, you could use the Toolbox.areObjectsColliding or Toolbox.getClosestPointsBetweenObjects methods with the detector's controllers' entities.

There may be a minor change with this in v0.6.0, I haven't quite decided yet. It would be nice if collision events were still dispatched when a collision occurred with a 'detector' entity so that you wouldn't have to use Toolbox.areObjectsColliding or Toolbox.getClosestPointsBetweenObjects to collect detailed information.
Post Reply