Move non dynamic entity

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Fax3D
Posts: 22
Joined: Mon Sep 29, 2008 7:42 am

Move non dynamic entity

Post by Fax3D »

Hi all,

I've created a CompoundBody adding to it some Entity, and then i make it non dynamic via CompoundBody.makeNonDynamic().
What i want to do is to apply some rotation/translation to the entire CompoundBody. I tried with CompoundBody.Rotate and some other stuff but not works, only if the CompoundBody is dynamic. There's a way to do this with non dynamic objects?

Thanks for helps!

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

Re: Move non dynamic entity

Post by Norbo »

This is most likely due to the object's inactivity. Kinematic objects will fall asleep; a sleeping compound object will not propagate its own rotation to its children since no updates are occurring. If you call (CompoundBody).activate() when you perform a rotation or just set the body's isAlwaysActive flag to true during initialization it should work.
Fax3D
Posts: 22
Joined: Mon Sep 29, 2008 7:42 am

Re: Move non dynamic entity

Post by Fax3D »

Thanks a lot Norbo, now it works like i should expect!

Fax3D
Post Reply