A constraint which makes the constrained object move along the curve path.
Constraints are used to set up various relations between objects by
affecting their position, rotation and scale. Can be used with the
Object3D.constraints property.
Constructor
MotionPathConstraint()
Properties
See the base Constraint class for common properties.
Enables banking. Banking means the object will lean in towards the center of the curvature of the curve that it travels along, like a motorcycle going around a corner, i.e. it is a kind of roll to left-right. Default is false.
The array of sums of chord lengths. Chord lengths are stored like this: [lengthOfChord1, lengthOfChord1 + lengthOfChord2, ...] The last element equals to approximated curve length. Note: does not work when useChordLength is disabled. Default is [].
The total chords count on the curve, used when useChordLength flag is enabled. The bigger the number the more uniformly will be object movement. If chordsNum <= 0 then it will be computated automatically. Note: always call init method to apply changes. Default is 0.
The packed array of NURBS curve's control points. "Packed" means that the control points stored like this: [point_1.x, point_1.y, point_1.z, point_2.x, point_2.y, point_2.z, ...] Note: always call init method to apply changes. Default is [].
In Verge3D we use right-handed coordinate system with the Y axis pointing in the up direction, but Blender and 3ds Max uses right-handed coordinate system with Z axis pointing in the up direction (Verge3D wiki). So, to correct the rotation for cameras and lights, set fixCameraLightRotation = true. Default is false.
The axis of the constrained object that aligns with the front vector, in other words the axis that aligns to the curve tangent. Can be one of the "X", "-X", "Y", "-Y", "Z", "-Z". Default is "Z".
The array of NURBS curve knots. Note: it's length always have to be number of control points + degree + 1 Note: always call init method to apply changes. Default is [].
Set how the offset transformation will be applied to current constraint transformation: 0 -- the position and rotation transformations will be applied separately (3ds Max behavior). 1 -- the transformation will be applied as an matrix multiplication (Blender behavior).
Default is 0.
Set how the offset rotation will be applied to current constraint rotation: 0 -- only constraint rotation will be applied (3ds Max, Maya behavior). 1 -- the constraint rotation will be applied first, then offset rotation (Blender).
Default is 0.
The array of tilt angles (bank angles, roll angles) in randians at each curve control point. This is an alternative for bank. The values are stored like this: [tiltAngleForFirstPoint, tiltAngleForSecondPoint, ...] Note: does not work when usePointsTilt is disabled. Note: always call init method to apply changes. Default is [].
The axis of the constrained object that's always aligned with the worldUpVector as much as possible. Can be one of the "X", "-X", "Y", "-Y", "Z", "-Z". Default is "Y".
If enabled the object will follow the path with an offset distance based on its original world space position which was saved at first call of update function. Note: Works only if useObjOffset enabled. Default is false.