TargetConstraint

CopyRotationConstraint

A constraint which makes the constrained object inherit the target's rotation.

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

CopyRotationConstraint(target : Object3D)

target — constraint's target object.

Properties

See the base TargetConstraint class for common properties.

.fixCameraLightRotation : Boolean

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.

.isCopyRotationConstraint : Boolean

Used to check whether this or derived classes are copy rotation constraints. Default is true.

.influence : Float

The percentage of influence the constraint has on the object. Default is 1.0 (100%).

.mixMode : String

Specifies how the new rotation is combined with the existing rotation. Default is 'REPLACE'.

'AFTER'
The new rotation is added after the existing rotation.
'BEFORE'
The new rotation is added before the existing rotation.
'REPLACE'
The new axis values replace existing values.

.type : String

The constraint's type. Equals to 'CopyRotationConstraint'.

Methods

See the base TargetConstraint class for common methods.

Puzzles

You can use the copy transform puzzle to apply CopyRotationConstraint in a visual manner.

Source

For more info on how to obtain the source code of this module see this page.