Make an object immovable to some groups(kinematic?)

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
dynamoman
Posts: 12
Joined: Mon Sep 27, 2010 12:35 am

Make an object immovable to some groups(kinematic?)

Post by dynamoman »

What is the best way to have objects that treat other objects as if they were kinematic?.

I have a platform with some blocks, and we would like the player to be able to push blocks, but not the enemies, although both use the charactercontroller. Or another example is a platform that must be unpushable until certain point.

I considered using a raycast to stop the player if it collides with it, but is there a better way?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Make an object immovable to some groups(kinematic?)

Post by Norbo »

I have a platform with some blocks, and we would like the player to be able to push blocks, but not the enemies, although both use the charactercontroller.
For objects which must appear kinematic to one set of objects and dynamic to another set of objects at the same time, create a kinematic proxy for the dynamic object. Set the position, orientation, linear velocity, and angular velocity of a similarly shaped kinematic entity to that of a target dynamic entity each frame. Set up the CollisionRules such that certain objects hit the kinematic version, while other objects hit the dynamic version.
Or another example is a platform that must be unpushable until certain point.
For objects which need to behave dynamic and one time and kinematic at a different time, the entity state can be changed using the BecomeDynamic and BecomeKinematic functions.
Post Reply