Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/Ketsji/KX_IPO_SGController.cpp
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| void KX_IpoSGController::UpdateSumoReference() | |||||
| { | |||||
| if (m_game_object) { | |||||
| } | |||||
| } | |||||
| void KX_IpoSGController::SetGameObject(KX_GameObject *go) | void KX_IpoSGController::SetGameObject(KX_GameObject *go) | ||||
| { | { | ||||
| m_game_object = go; | m_game_object = go; | ||||
| Context not available. | |||||
| else { | else { | ||||
| // Local ipo should be defined with the object position at (0,0,0) | // Local ipo should be defined with the object position at (0,0,0) | ||||
| // Local transform is applied to the object based on initial position | // Local transform is applied to the object based on initial position | ||||
| MT_Point3 newPosition(0.0f, 0.0f, 0.0f); | MT_Vector3 newPosition(0.0f, 0.0f, 0.0f); | ||||
| if (!m_ipo_add) | if (!m_ipo_add) | ||||
| newPosition = ob->GetLocalPosition(); | newPosition = ob->GetLocalPosition(); | ||||
| Context not available. | |||||
| roll += m_ipo_xform.GetDeltaEulerAngles()[2]; | roll += m_ipo_xform.GetDeltaEulerAngles()[2]; | ||||
| } | } | ||||
| if (m_game_object) | if (m_game_object) | ||||
| m_game_object->NodeSetLocalOrientation(MT_Vector3(yaw, pitch, roll)); | m_game_object->NodeSetLocalOrientation(MT_Matrix3x3(MT_Vector3(yaw, pitch, roll))); | ||||
| } | } | ||||
| } | } | ||||
| else if (m_ipo_start_initialized) { | else if (m_ipo_start_initialized) { | ||||
| Context not available. | |||||