Develop

Interaction Types

Updated: Sep 4, 2026
IWSDK exposes three grab components. Each component produces a different handle configuration and pointer-event policy.

One-hand grabbing

OneHandGrabbable uses one direct input. It supports translation and rotation but not scale.
entity.addComponent(OneHandGrabbable, {
  rotate: true,
  translate: true,
  rotateMin: [-Math.PI / 4, -Math.PI, -Math.PI / 4],
  rotateMax: [Math.PI / 4, Math.PI, Math.PI / 4],
});
The generated handle uses multitouch: false and denies ray pointer events for the handle’s lifetime, from component initialization until the grab component is removed.
Use it for tools, controls, and objects whose scale must remain unchanged.

Two-hand grabbing

TwoHandsGrabbable supports translation, rotation, and scale from two direct inputs.
entity.addComponent(TwoHandsGrabbable, {
  rotate: true,
  translate: true,
  scale: true,
  scaleMin: [0.5, 0.5, 0.5],
  scaleMax: [2, 2, 2],
});
The generated handle uses multitouch: true and denies ray pointer events. Use it when an object needs two-input positioning or resizing.

Distance grabbing

DistanceGrabbable accepts ray input and denies grab-pointer events. Its four movement modes are:
MovementMode.MoveFromTarget;
MovementMode.MoveTowardsTarget;
MovementMode.MoveAtSource;
MovementMode.RotateAtSource;
  • MoveFromTarget uses projected-ray handle movement.
  • MoveTowardsTarget interpolates toward the pointer origin plus configured position and quaternion offsets.
  • MoveAtSource applies the pointer origin’s frame-to-frame delta.
  • RotateAtSource rotates the object without translation or scale.
The current MoveTowardsTarget implementation uses time-scaled interpolation and snaps within 0.005 world units. Configure its speed with moveSpeedFactor.
entity.addComponent(DistanceGrabbable, {
  movementMode: MovementMode.MoveTowardsTarget,
  moveSpeedFactor: 0.15,
  targetPositionOffset: [0, 0, -0.25],
});
See Distance grabbing for offsets, constraints, and return-to-origin behavior.

Pointer routing

Grab typePointer usedPointer type denied while the handle exists
One hand
Direct grab
Ray
Two hands
Direct grab
Ray
Distance
Ray
Grab
This routing prevents direct and remote handles from competing for the same object.

Selection guide

  • Use one-hand grabbing for direct tools and controls.
  • Use two-hand grabbing when the user needs scale or two-input stabilization.
  • Use distance grabbing for objects beyond direct reach.
  • Use RotateAtSource for a fixed-position dial or valve.
Start with Grabbing overview to enable the feature and make an entity interactable.