avoid crash and apply force for soft bodies.

copy normals for soft body vertices, to get proper lighting
This commit is contained in:
2008-09-25 17:53:15 +00:00
parent 27098d3aa0
commit 9c08e86b06
3 changed files with 44 additions and 19 deletions
@@ -727,6 +727,13 @@ void KX_ConvertODEEngineObject(KX_GameObject* gameobj,
nodes[v.getSoftBodyIndex()].m_x.getY(),
nodes[v.getSoftBodyIndex()].m_x.getZ());
v.SetXYZ(pt);
MT_Vector3 normal (
nodes[v.getSoftBodyIndex()].m_n.getX(),
nodes[v.getSoftBodyIndex()].m_n.getY(),
nodes[v.getSoftBodyIndex()].m_n.getZ());
v.SetNormal(normal);
}
}
return true;