enabling ODE body in a few more situations as well
git-svn-id: svn://anubis/misc/OdeWorld@220 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
parent
54c963fa3b
commit
673ff66a0c
@ -441,7 +441,10 @@ void OdeWorld::Object::setPosition(double x, double y, double z)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (m_body != 0)
|
if (m_body != 0)
|
||||||
|
{
|
||||||
dBodySetPosition(m_body, x, y, z);
|
dBodySetPosition(m_body, x, y, z);
|
||||||
|
enableBody();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
m_position[0] = x;
|
m_position[0] = x;
|
||||||
m_position[1] = y;
|
m_position[1] = y;
|
||||||
@ -493,7 +496,10 @@ void OdeWorld::Object::setRotation(dReal x, dReal y, dReal z)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (m_body != 0)
|
if (m_body != 0)
|
||||||
|
{
|
||||||
dBodySetRotation(m_body, r);
|
dBodySetRotation(m_body, r);
|
||||||
|
enableBody();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -554,6 +560,7 @@ void OdeWorld::Object::setMass(dReal newmass)
|
|||||||
{
|
{
|
||||||
dMassAdjust(&m_mass, newmass);
|
dMassAdjust(&m_mass, newmass);
|
||||||
dBodySetMass(m_body, &m_mass);
|
dBodySetMass(m_body, &m_mass);
|
||||||
|
enableBody();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user