Physics/PhysObject: Fixed SetGeom
Former-commit-id: e7a343d90b1ec6ced031c5a0816e00e9c5c3b61c
This commit is contained in:
parent
5b44619592
commit
1a403eb79c
|
|
@ -217,10 +217,15 @@ bool NzPhysObject::IsSleeping() const
|
|||
|
||||
void NzPhysObject::SetGeom(NzPhysGeomRef geom)
|
||||
{
|
||||
if (m_geom != geom)
|
||||
{
|
||||
if (geom)
|
||||
m_geom = geom;
|
||||
else
|
||||
m_geom = NzNullGeom::New();
|
||||
|
||||
NewtonBodySetCollision(m_body, m_geom->GetHandle(m_world));
|
||||
}
|
||||
}
|
||||
|
||||
void NzPhysObject::SetGravityFactor(float gravityFactor)
|
||||
|
|
|
|||
Loading…
Reference in New Issue