protected override void OnControlReleased_UpdateCamera() { base.OnControlReleased_UpdateCamera(); m_cameraSpring = null; m_cameraShake = null; }
public override void UpdateAfterSimulation() { base.UpdateAfterSimulation(); if (m_cameraShake != null && m_cameraSpring == null) { Debug.Assert(CubeGrid != null && CubeGrid.Physics != null, "Grid is null or has no physics!"); m_cameraSpring = new MyCameraSpring(CubeGrid.Physics); } if (m_cameraShake != null && m_cameraSpring != null) { m_cameraSpring.Update(MyEngineConstants.UPDATE_STEP_SIZE_IN_SECONDS, PositionComp.GetWorldMatrixNormalizedInv(), ref m_playerHeadSpring); m_cameraShake.UpdateShake(MyEngineConstants.UPDATE_STEP_SIZE_IN_SECONDS, ref m_playerHeadSpring, ref m_playerHeadShakeDir); } }
public override void UpdateAfterSimulation() { base.UpdateAfterSimulation(); if (m_cameraShake != null && m_cameraSpring == null) { Debug.Assert(CubeGrid != null && CubeGrid.Physics != null, "Grid is null or has no physics!"); m_cameraSpring = new MyCameraSpring(CubeGrid.Physics); } if (m_cameraShake != null && m_cameraSpring != null) { m_cameraSpring.Update(VRage.Game.MyEngineConstants.UPDATE_STEP_SIZE_IN_SECONDS, PositionComp.WorldMatrixNormalizedInv, ref m_playerHeadSpring); m_cameraShake.UpdateShake(VRage.Game.MyEngineConstants.UPDATE_STEP_SIZE_IN_SECONDS, ref m_playerHeadSpring, ref m_playerHeadShakeDir); } }