Fixed rotation of movable objects
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9578 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -65,12 +65,12 @@ PhysicalObject::PhysicalObject(const XMLNode &xml_node)
|
||||
else if(shape=="box" ) m_body_type = MP_BOX;
|
||||
else if(shape=="sphere" ) m_body_type = MP_SPHERE;
|
||||
else fprintf(stderr, "Unknown shape type : %s\n", shape.c_str());
|
||||
|
||||
|
||||
m_init_pos.setIdentity();
|
||||
Vec3 hpr(m_init_hpr);
|
||||
hpr.degreeToRad();
|
||||
btQuaternion q;
|
||||
q.setEuler(hpr.getX(), hpr.getY(), hpr.getZ());
|
||||
q.setEuler(hpr.getY(), hpr.getX(), hpr.getZ());
|
||||
m_init_pos.setRotation(q);
|
||||
Vec3 init_xyz(m_init_xyz);
|
||||
m_init_pos.setOrigin(init_xyz);
|
||||
|
||||
Reference in New Issue
Block a user