void SceneNode::SetAbsoluteRotation(float rot) { m_relative.rotation=m_absolute.rotation=rot; if(m_parent) { m_relative.rotation-=m_parent->m_absolute.rotation; } RotationChanged(); }
//------------------------------------------------------------------------ void CVehiclePartAnimated::PostSerialize() { if (m_iRotChangedFrameId) { // if necessary, make sure skeleton gets updated in 1st frame m_iRotChangedFrameId = 0; RotationChanged(0); } else if (gEnv->pSystem->IsSerializingFile() == 2 && m_pVehicle->IsDestroyed()) m_serializeForceRotationUpdate = true; }
void SceneNode::SetRelativeRotation(float rot) { m_relative.rotation = rot; m_absolute.rotation = rot; if(m_parent) { m_absolute.rotation+=m_parent->m_absolute.rotation; } SetRelativePosition(m_relative.position); RotationChanged(); }