Gravity fix
This commit is contained in:
parent
2a816469d5
commit
b3656a0527
|
@ -187,7 +187,7 @@ void API_Impl::Update()
|
||||||
if( gravityImpulse != Float4::null )
|
if( gravityImpulse != Float4::null )
|
||||||
{
|
{
|
||||||
state.ApplyLinearImpulse( gravityImpulse.xyz );
|
state.ApplyLinearImpulse( gravityImpulse.xyz );
|
||||||
(*proto)->SetGravityNormal( gravityImpulse.GetNormalized().xyz );
|
state.SetGravityNormal( gravityImpulse.GetNormalized().xyz );
|
||||||
(*proto)->SetState( state );
|
(*proto)->SetState( state );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,6 +105,7 @@ void SphericalRigidBody::SetState( const SphericalRigidBody::State &state )
|
||||||
this->rigid.frictionCoeff_Kinetic = state.GetFrictionCoeff_Kinetic();
|
this->rigid.frictionCoeff_Kinetic = state.GetFrictionCoeff_Kinetic();
|
||||||
this->rigid.SetMass_KeepMomentum( state.GetMass() );
|
this->rigid.SetMass_KeepMomentum( state.GetMass() );
|
||||||
this->rigid.SetMomentOfInertia_KeepMomentum( state.GetMomentOfInertia() );
|
this->rigid.SetMomentOfInertia_KeepMomentum( state.GetMomentOfInertia() );
|
||||||
|
this->rigid.gravityNormal = state.GetGravityNormal();
|
||||||
|
|
||||||
if( state.IsForwarded() )
|
if( state.IsForwarded() )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue