Physics/PhysObject: PhysObject now always have a valid geom
Former-commit-id: 3b93b318545a7f0b28a9afd82868c7460f63a80f
This commit is contained in:
parent
1a403eb79c
commit
a71c86c0ca
|
|
@ -24,7 +24,9 @@ m_gravityFactor(1.f),
|
|||
m_mass(0.f)
|
||||
{
|
||||
NazaraAssert(m_world, "Invalid world");
|
||||
NazaraAssert(m_geom, "Invalid geometry");
|
||||
|
||||
if (!m_geom)
|
||||
m_geom = NzNullGeom::New();
|
||||
|
||||
m_body = NewtonCreateDynamicBody(m_world->GetHandle(), m_geom->GetHandle(m_world), m_matrix);
|
||||
NewtonBodySetUserData(m_body, this);
|
||||
|
|
|
|||
Loading…
Reference in New Issue