avoid crash and apply force for soft bodies.
copy normals for soft body vertices, to get proper lighting
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user