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>2006-04-17 05:33:10 +0400
committerErwin Coumans <blender@erwincoumans.com>2006-04-17 05:33:10 +0400
commit971ee74c845e31cec49e428877fbdc6315dda0ed (patch)
tree56f4d2bc2ce2cde3f8a0b7d1c4a733a41d78306c /source/gameengine/Converter
parent176641b2730084ae279e1567af92d5e493c60f03 (diff)
added support for 'Ghost' object and collision sensor (preliminary)
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index d994fe2a7d1..0399d4e61c1 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -1004,15 +1004,6 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools*
return meshobj;
}
-static PHY_MaterialProps g_materialProps = {
- 1.0, // restitution
- 2.0, // friction
- 0.0, // fh spring constant
- 0.0, // fh damping
- 0.0, // fh distance
- false // sliding material?
-};
-
static PHY_MaterialProps *CreateMaterialFromBlenderObject(struct Object* blenderobject,
@@ -1036,7 +1027,14 @@ static PHY_MaterialProps *CreateMaterialFromBlenderObject(struct Object* blender
materialProps->m_fh_normal = (blendermat->dynamode & MA_FH_NOR) != 0;
}
else {
- *materialProps = g_materialProps;
+ //give some defaults
+ materialProps->m_restitution = 0.f;
+ materialProps->m_friction = 0.5;
+ materialProps->m_fh_spring = 0.f;
+ materialProps->m_fh_damping = 0.f;
+ materialProps->m_fh_distance = 0.f;
+ materialProps->m_fh_normal = false;
+
}
return materialProps;