Rotation expressions

The following expressions are used for rotation functions:

3 POINTS ROTATION Description
Returns A rotation value.
Syntax point3rotation(vector1,vector2,vector3) Vector1, vector2, and vector3 are vectors that represent three discrete positions in 3D space. Example: point3rotation({0,0,0},{100,100,100},{100,0,-100})The rotation vector that this returns is: {-120,-35.26,45}.This rotation vector is derived by the axes (vector2-vector1) to spin the axes correctly on the third position vector (vector3).
ADD ROTATION Description
Purpose Adds two rotations. Vector1 and vector2 are vectors that represent discrete XYZ rotations.
Syntax addrotation(vector1,vector2)
ANGLE DIFF POINTS Description
Purpose Calculates the angle between two vectors or points, using a supplied radius.
Syntax anglediffpoints
ANGLE DIFF ROTATIONS Description
Purpose Calculates the difference between the rotation of two objects. The result can be scaled and offset.
Syntax anglediffrotations (R1, R2)
ANGULAR ACCELERATION Description
Returns The angular acceleration of a rotation vector.
Syntax angularacc(vector) Vector is a vector that represents an XYZ rotation.
ANGULAR SPEED Description
Returns The angular speed of a rotation vector.
Syntax angularspeed(vector)Vector is a vector that represents an XYZ rotation.
DERIVATIVE Description
Returns The derivative of a vector by time.
Syntax derivative(vector)
GLOBAL TO LOCAL Description
Purpose Converts a rotation vector from global to local coordinates.
Syntax globaltolocal (rotation)Vector is a vector that represents a position or a speed in 3D space.
GRAVITY MOVE Description
Returns A position.
Syntax gravitymove(vector1, vector2, vector3)Vector1 is a vector that represents an initial position in 3D space.Vector2 is a vector that represents an initial speed. Vector3 is a vector that represents the acceleration that you want to give to your current position.
INTERPOLATE ROTATION Description
Purpose Interpolates between two rotations.
Syntax interpolaterotation(R1, R2)
LOCAL TO GLOBAL Description
Purpose Converts a rotation vector from local to global coordinates.
Syntax localtoglobal(Rotation)
MOVE Description
Returns A position.
Syntax move(vector1, vector2, vector3) Vector1 is a vector that represents an initial position in 3D space.Vector2 is a vector that represents an initial speed. Vector3 is a vector that represents the acceleration that you want to give to your current position.
ORBIT Description
Returns A position. Number is a real number that represents the acceleration constant (MorimobjG6.673E-11) between the origin and the current position (G = 6,672e-11 N m2/kg2).
Syntax orbit(vector1, vector2, vector3, number) Vector1 is a vector that represents an initial origin position in 3D space (attractive point). Vector2 is a vector that represents the initial object position in 3D space. Vector3 is a vector that represents an initial speed of your object position.
POSITION DAMPING Description
Returns A position.Number1 is a number that represents the maximum speed. Number2 is a number that represents the maximum acceleration. Number3 is a number that represents the damping ratio. (Includes Play Mode in-connector.)
Syntax positiondamping(vector1, number1, number2, number3)Vector1 is a position vector in 3D space.
ROTATION DAMPING Description
Returns An XYZ rotation. Vector1 is an XYZ rotation vector. Number1 is a number that represents the maximum angular speed.Number2 is a number that represents the maximum angular acceleration. Number3 is a number that represents the damping ratio. (Includes Play Mode in-connector.)
Syntax rotationdamping(vector1, number1, number2, number3)
ROTATION PRODUCT Description
Returns The rotation vector multiplied by a ratio number. Number is a real number that represents a multiplication ratio.
Syntax multrotation(vector,number)Vector is a vector that represents an XYZ rotation.
SENSOR ROTATION HELPER Description
Syntax sensorrotationhelper
SUB ROTATION Description
Purpose Substitutes two rotations.
Syntax subrotation(vector1,vector2)Vector1 and vector2 are vectors that represent discrete XYZ rotations.
SPEED Description
Returns The speed of a position vector.
Syntax speed(vector)Vector is a vector that represents a position in 3D space.