Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/Ketsji/KX_ObjectActuator.cpp
| Context not available. | |||||
| else if (m_bitLocalFlag.CharacterMotion) { | else if (m_bitLocalFlag.CharacterMotion) { | ||||
| MT_Vector3 dir = m_dloc; | MT_Vector3 dir = m_dloc; | ||||
| if (m_bitLocalFlag.DLoc) { | |||||
| MT_Matrix3x3 basis = parent->GetPhysicsController()->GetOrientation(); | |||||
| dir = basis * dir; | |||||
| } | |||||
| if (m_bitLocalFlag.AddOrSetCharLoc) { | if (m_bitLocalFlag.AddOrSetCharLoc) { | ||||
| MT_Vector3 old_dir = character->GetWalkDirection(); | MT_Vector3 old_dir = character->GetWalkDirection(); | ||||
sybren: Style: opening bracket on same line as if-statement. | |||||
Not Done Inline ActionsStyle: spaces around operators. sybren: Style: spaces around operators. | |||||
| Context not available. | |||||
| } | } | ||||
| // We always want to set the walk direction since a walk direction of (0, 0, 0) should stop the character | // We always want to set the walk direction since a walk direction of (0, 0, 0) should stop the character | ||||
| if (m_bitLocalFlag.DLoc) | |||||
| { | |||||
| MT_Matrix3x3 basis = parent->GetPhysicsController()->GetOrientation(); | |||||
| dir = basis*dir; | |||||
| } | |||||
| character->SetWalkDirection(dir/parent->GetScene()->GetPhysicsEnvironment()->GetNumTimeSubSteps()); | character->SetWalkDirection(dir/parent->GetScene()->GetPhysicsEnvironment()->GetNumTimeSubSteps()); | ||||
| if (!m_bitLocalFlag.ZeroDRot) | if (!m_bitLocalFlag.ZeroDRot) | ||||
| Context not available. | |||||
Not Done Inline ActionsStyle: opening bracket on same line as if-statement. sybren: Style: opening bracket on same line as if-statement. | |||||
Style: opening bracket on same line as if-statement.