Added initial rotation of physical objects.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7628 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
49bfcc98c2
commit
4f34ccd2e2
@ -79,6 +79,7 @@ void* btKartRaycaster::castRay(const btVector3& from, const btVector3& to,
|
||||
result.m_hitNormalInWorld =
|
||||
tm.getInterpolatedNormal(rayCallback.getTriangleIndex(),
|
||||
result.m_hitPointInWorld);
|
||||
#define DEBUG_NORMALS
|
||||
#ifdef DEBUG_NORMALS
|
||||
printf("old %f %f %f new %f %f %f\n",
|
||||
n.getX(), n.getY(), n.getZ(),
|
||||
|
@ -59,6 +59,11 @@ PhysicalObject::PhysicalObject(const XMLNode &xml_node)
|
||||
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());
|
||||
m_init_pos.setRotation(q);
|
||||
Vec3 init_xyz(m_init_xyz);
|
||||
m_init_pos.setOrigin(init_xyz);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user