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:
authorBenoit Bolsee <benoit.bolsee@online.be>2012-05-29 01:36:29 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2012-05-29 01:36:29 +0400
commitdfc19a1ff7968e547c33ef3304849f69ddf76f4f (patch)
tree62764fb4d5ebf37785a1d34dcda7e01d4392bc18 /source/blender/makesdna/DNA_object_types.h
parent4e0492e3bc59a4adca8ea5075a96bc78cd6bb67a (diff)
BGE patch #28476: Character object physics type
=============================================== This patch adds a new "Character" BGE physics type which uses Bullet's btKinematicCharacter for simulation instead of full-blown dynamics. It is appropiate for (player-controlled) characters, for which the other physics types often result unexpected results (bouncing off walls, sliding etc.) and for which simple kinematics offers much more precision. "Character" can be chosen like any other physics type in the "Physics" section of the properties window. Current settings for tweaking are "Step Height" (to make the object automatically climb small steps if it collides with them), "Fall Speed" (the maximum speed that the object can have when falling) and "Jump Speed", which is currently not used. See http://projects.blender.org/tracker/?func=detail&atid=127&aid=28476&group_id=9 for sample blends and a discussion on the patch: how to use it and what influences the behavior of the character object. Known problem: there is a crash if the "compound" option is set in the physics panel of the Character object.
Diffstat (limited to 'source/blender/makesdna/DNA_object_types.h')
-rw-r--r--source/blender/makesdna/DNA_object_types.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 1ea50ec9c1a..11ca1f1fa8e 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -204,6 +204,12 @@ typedef struct Object {
float min_vel; /* clamp the maximum velocity 0.0 is disabled */
float m_contactProcessingThreshold;
float obstacleRad;
+
+ /* "Character" physics properties */
+ float step_height;
+ float jump_speed;
+ float fall_speed;
+ char pad1[4];
short rotmode; /* rotation mode - uses defines set out in DNA_action_types.h for PoseChannel rotations... */
@@ -483,6 +489,7 @@ typedef struct DupliObject {
#define OB_SENSOR 0x80000
#define OB_NAVMESH 0x100000
#define OB_HASOBSTACLE 0x200000
+#define OB_CHARACTER 0x400000
/* ob->gameflag2 */
#define OB_NEVER_DO_ACTIVITY_CULLING 1
@@ -504,6 +511,7 @@ typedef struct DupliObject {
#define OB_BODY_TYPE_OCCLUDER 5
#define OB_BODY_TYPE_SENSOR 6
#define OB_BODY_TYPE_NAVMESH 7
+#define OB_BODY_TYPE_CHARACTER 8
/* ob->scavisflag */
#define OB_VIS_SENS 1