Objects not falling...

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
sfxman
Posts: 15
Joined: Sat Sep 18, 2010 1:28 am

Objects not falling...

Post by sfxman »

Hello,

I just updated from 0.14 to 0.15.2 and I'm having a problem I can't figure out...

My objects are not falling towards the ground. I set the gravity like in the samples, Update() is called just fine because when I set an initial velocity to my objects, they indeed move in that direction.
It just feels like gravity, or any other forces that I apply are not impacting the bodies...

Any ideas?

Thanks!
Matt
sfxman
Posts: 15
Joined: Sat Sep 18, 2010 1:28 am

Re: Objects not falling...

Post by sfxman »

I found out what the problem was, there was no mass set on my compound body. I assumed that the weight of the sub bodies would be added to the main body.

However, I still have a problem... the compound body is added to a vehicle, and for some reason I don't see any change in the object position...

I see that the body has a linear velocity, but it never seems to impact the position/transform of the vehicle body...

Help :)

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

Re: Objects not falling...

Post by Norbo »

If the entity does not belong to a space, then it cannot update. Even if you apply a linear velocity, it won't be integrated into a position change until after space.Update occurs with the entity in the space. If it is in the space, then I'm not sure; I'll probably need more details.
sfxman
Posts: 15
Joined: Sat Sep 18, 2010 1:28 am

Re: Objects not falling...

Post by sfxman »

Duh... I guess the line that adds the vehicle to the space was removed when I ported over to 0.15.2 :)

Thanks a lot for the help! :)

--
Matt
Post Reply