[page:TargetConstraint] →

[name]

A constraint which restricts the position of the constrained object based on the target's position. Thus the target object behaves like an "inivisible wall", "floor", etc...

Constraints are used to set up various relations between objects by affecting their position, rotation and scale. Can be used with the [page:Object3D.constraints Object3D.constraints] property.

Constructor

[name]([page:Object3D target])

Properties

See the base [page:TargetConstraint] class for common properties.

[property:String floorLocation]

The axis to apply the restriction along. Can be one of the "X", "-X", "Y", "-Y", "Z", "-Z". Positive means that the constrained object's position along this axis can only be above the [page:.offset] value. Negative means - only under the [page:.offset] value. Default is "Y".

[property:Boolean isFloorConstraint]

Used to check whether this or derived classes are floor constraints. Default is *true*.

[property:Number offset]

The limiting value along the [page:.floorLocation] axis. Default is 0.

[property:String type]

The constraint's type. Equals to "FloorConstraint".

Methods

See the base [page:TargetConstraint] class for common methods.