Example #1
0
void SceneNode::SetAbsoluteRotation(float rot)
{
    m_relative.rotation=m_absolute.rotation=rot;
    if(m_parent)
    {
        m_relative.rotation-=m_parent->m_absolute.rotation;
    }
    RotationChanged();
}
Example #2
0
//------------------------------------------------------------------------
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;
}
Example #3
0
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();
}