public void UpdateRotation() { // Roll - to Right side. _rollAngle = _rollAngle * 0.8f + (_maxRollAngle * (_upSpeed / _maxSpeed)) * 0.2f; Ang3 newRotation = new Ang3(); newRotation.x = MathHelpers.DegreesToRadians(_pitchAngle); newRotation.y = MathHelpers.DegreesToRadians(_rollAngle); newRotation.z = _yawDeg; Entity.Rotation = Quaternion.CreateRotationXYZ(newRotation); }
public void UpdateRotation() { // Roll - to Right side. _rollAngle = _rollAngle * 0.8f + (_maxRollAngle * (_upSpeed / _maxSpeed)) * 0.2f; Ang3 newRotation = new Ang3(); newRotation.x = Utils.Deg2Rad(_pitchAngle); newRotation.y = Utils.Deg2Rad(_rollAngle); newRotation.z = _yawDeg; Rotation = Quat.CreateRotationXYZ(newRotation); }
public void TestNativeManagedEqualityAngles3() { //managed Angles3 angles = new Angles3(1f, 2f, 3f); Quaternion managedQuaternion = new Quaternion(angles); //native Ang3 angles2 = angles; Quat nativeQuaternion = Quat.CreateIdentity(); nativeQuaternion.SetRotationXYZ(angles2); Assert.IsTrue(managedQuaternion == nativeQuaternion); }