Apply offset on meshes with exact collision shape, fixes #2300

This commit is contained in:
Marianne Gagnon 2015-08-31 19:57:55 -04:00
parent 90b95c7fb5
commit 9a6b41d2b5

View File

@ -324,7 +324,6 @@ void PhysicalObject::init()
} }
case MP_EXACT: case MP_EXACT:
{ {
m_graphical_offset = Vec3(0,0,0);
extend.setY(0); extend.setY(0);
TriangleMesh* triangle_mesh = new TriangleMesh(); TriangleMesh* triangle_mesh = new TriangleMesh();
@ -450,7 +449,8 @@ void PhysicalObject::init()
triangle_mesh->createCollisionShape(); triangle_mesh->createCollisionShape();
m_shape = &triangle_mesh->getCollisionShape(); m_shape = &triangle_mesh->getCollisionShape();
m_triangle_mesh = triangle_mesh; m_triangle_mesh = triangle_mesh;
m_init_pos.setOrigin(m_init_pos.getOrigin() + m_graphical_offset);
// m_graphical_offset = Vec3(0,0,0);
break; break;
} }
case MP_NONE: case MP_NONE: