Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2008-09-25 21:53:15 +0400
committerErwin Coumans <blender@erwincoumans.com>2008-09-25 21:53:15 +0400
commit9c08e86b062fe2faa69894faccdc0e2ce2d8190d (patch)
tree4d1840687dc1a2f2ed58a486a12260eaa0624f21 /source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
parent27098d3aa019a010f83f94ce935a6de63680ca2c (diff)
avoid crash and apply force for soft bodies.
copy normals for soft body vertices, to get proper lighting
Diffstat (limited to 'source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
index 5744a860e92..f90df047ca0 100644
--- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
+++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
@@ -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;