Exemple #1
0
        /// <summary>
        /// Creates a quaternion from a matrix.
        /// </summary>
        /// <param name="matrix">A matrix representing an orientation.</param>
        /// <returns>JQuaternion representing an orientation.</returns>
        #region public static JQuaternion CreateFromMatrix(JMatrix matrix)
        public static FPQuaternion CreateFromMatrix(FPMatrix matrix)
        {
            FPQuaternion result;

            FPQuaternion.CreateFromMatrix(ref matrix, out result);
            return(result);
        }
 /**
  *  @brief Rotates game object to point forward vector to a target position.
  *
  *  @param target Target position.
  **/
 public void LookAt(FPVector target)
 {
     this.rotation = FPQuaternion.CreateFromMatrix(FPMatrix.CreateFromLookAt(position, target));
 }