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.
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
.
Scales the banking angle. Default is 1
.
The maximum allowed absolute banking angle in radians. Default is Infinity
.
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 []
.
The degree of NURBS curve, i.e. the degree of path curve. Note: always call init method to apply changes. Default is 3
.
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
.
Object will stay locked to a single point along the curve regardless of animation. Default is 0.0
.
If on, computes the object’s orientation (rotation) as it moves along the curve. Default is true
.
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 percentage of influence the constraint has on the object. Default is 1.0
(100%).
Used to check whether this or derived classes are Motion Path constraints. Default is true
.
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
.
An additional offset to value. Note: does not work when useFixedLocation is enabled. Default is 0.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 constraint's type. Equals to 'MotionPathConstraint'
.
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'
.
Enable it to make object uniformly move along the curve. Default is false
.
When enabled the value will be clamped to interval [0.0, 1.0]
. Note: does not work when useCyclic is enabled. Default is false
.
Enable it to make value cyclic, for example if value = 1.6 then it will be 0.6
, if value = -1.6 it will be 0.4
. Default is false
.
Enable it to make object stay locked to a single point along the curve regardless of animation defined by fixedValue. Default is false
.
Enable or disable object's offset. Default is false
.
Similar to bank, but to use it the pointsTilt array have to be specified. Note: does not work when bank is enabled. Default is false
.
Enable or disable object's position offset. Note: Works only if useObjOffset enabled. Default is true
.
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
.
The current constraint value. Have to be in interval [0.0, 1.0]
if useCyclic disabled. Default is 0.0
.
The array of weights for each curve control point. Note: always call init method to apply changes. Default is []
.
A Vector3 in world space that the upAxis tries to align with as closely as possible. Default is (0, 1, 0)
.
Initialize constraint path curve. Note: always call this function after changing path curve parameters.
See the base Constraint class for common methods.
For more info on how to obtain the source code of this module see this page.