Physics2D/RigidBody2D: Fix SetMass need to be called twice
This commit is contained in:
parent
9772b43542
commit
e4c89f2763
|
|
@ -205,7 +205,10 @@ namespace Nz
|
|||
else if (mass > 0.f)
|
||||
{
|
||||
if (cpBodyGetType(m_handle) == CP_BODY_TYPE_STATIC)
|
||||
{
|
||||
cpBodySetType(m_handle, CP_BODY_TYPE_DYNAMIC);
|
||||
cpBodySetMass(m_handle, mass);
|
||||
}
|
||||
}
|
||||
|
||||
m_mass = mass;
|
||||
|
|
|
|||
Loading…
Reference in New Issue