示例#1
0
        public static Quaternion GetOrientation(Direction forward, Direction up)
        {
            var vecForward = Base6Directions.GetVector(forward);
            var vecUp      = Base6Directions.GetVector(up);

            return(Quaternion.CreateFromForwardUp(vecForward, vecUp)); // This can be replaced by lookup table
        }
示例#2
0
        public static Quaternion GetOrientation(Direction forward, Direction up)
        {
            Vector3 vector  = GetVector(forward);
            Vector3 vector2 = GetVector(up);

            return(Quaternion.CreateFromForwardUp(vector, vector2));
        }