Options
All
  • Public
  • Public/Protected
  • All
Menu

The point constraint is used for dragging and allows to specify the position where an object can be dragged to. The radius defines in which distance this constraint is being considered to be chosen from the constraints defined. The transformation and optional rotation of this constraint get applied to the node if it is the constraint with the closest distance to the ray that was used for the drag event. As this is a difficult topic, please visit our help desk section on interactions where we go through the process of setting everything up with examples.

deprecated

This class is deprecated and will be removed in the future. Please use the PointRestriction instead.

Hierarchy

  • PointConstraint

Implements

  • IDragConstraint

Index

Constructors

Accessors

Constructors

  • new PointConstraint(_point: vec3, _radius?: number, _rotation?: { angle: number; axis: vec3 }): PointConstraint
  • Parameters

    • _point: vec3

      the point

    • _radius: number = 0

      the radius in which the point is considered

    • Optional _rotation: { angle: number; axis: vec3 }

      the rotation in axis-angle representation that is applied to the node if the drag contraint becomes active

      • angle: number
      • axis: vec3

    Returns PointConstraint

Accessors

  • get point(): vec3
  • Returns vec3

  • get radius(): number
  • Returns number

  • get rotation(): undefined | { angle: number; axis: vec3 }
  • Returns undefined | { angle: number; axis: vec3 }