Gravity fix

This commit is contained in:
Dander7BD 2014-01-31 15:15:08 +01:00
parent 2a816469d5
commit b3656a0527
2 changed files with 2 additions and 1 deletions

View File

@ -187,7 +187,7 @@ void API_Impl::Update()
if( gravityImpulse != Float4::null )
{
state.ApplyLinearImpulse( gravityImpulse.xyz );
(*proto)->SetGravityNormal( gravityImpulse.GetNormalized().xyz );
state.SetGravityNormal( gravityImpulse.GetNormalized().xyz );
(*proto)->SetState( state );
}

View File

@ -105,6 +105,7 @@ void SphericalRigidBody::SetState( const SphericalRigidBody::State &state )
this->rigid.frictionCoeff_Kinetic = state.GetFrictionCoeff_Kinetic();
this->rigid.SetMass_KeepMomentum( state.GetMass() );
this->rigid.SetMomentOfInertia_KeepMomentum( state.GetMomentOfInertia() );
this->rigid.gravityNormal = state.GetGravityNormal();
if( state.IsForwarded() )
{