From 9191b783bb2bc1a2d4be2b2cd215735e68353a56 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Wed, 30 Jan 2013 05:55:17 +0000 Subject: BGE: Some various changes to make moving the character physics type easier: * Undoing the previous applyMovement() changes for characters. This was causing bugs for the Motion Actuator. * Creating a Character Motion type for the Motion Actuator with specific controls for characters. This includes moving, rotating and jumping. * Adding a KX_CharacterWrapper.walkDirection to set the character's direction and speed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Note, this also resolves the following bugs: [#33585] "Setting dLoc of motion actuator [0,0,0] via python won't stop object" reported by Manuel Bellersen (urfoex) [#33503] "Character physics type won´t accept more than one motion anymore" reported by Mr Larodos --- source/gameengine/Converter/KX_ConvertActuators.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/gameengine/Converter') diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index 695bf0c4dc8..05da38dd1af 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -180,7 +180,10 @@ void BL_ConvertActuators(const char* maggiename, bitLocalFlag.LinearVelocity = bool((obact->flag & ACT_LIN_VEL_LOCAL)!=0); bitLocalFlag.AngularVelocity = bool((obact->flag & ACT_ANG_VEL_LOCAL)!=0); bitLocalFlag.ServoControl = bool(obact->type == ACT_OBJECT_SERVO); + bitLocalFlag.CharacterMotion = bool(obact->type == ACT_OBJECT_CHARACTER); + bitLocalFlag.CharacterJump = bool((obact->flag & ACT_CHAR_JUMP)!=0); bitLocalFlag.AddOrSetLinV = bool((obact->flag & ACT_ADD_LIN_VEL)!=0); + bitLocalFlag.AddOrSetCharLoc = bool((obact->flag & ACT_ADD_CHAR_LOC)!=0); if (obact->reference && bitLocalFlag.ServoControl) { obref = converter->FindGameObject(obact->reference); -- cgit v1.2.3