R|AR Term

Raycasting

Also known as:Ray cast3D picking

Raycasting sends a mathematical ray from an origin in a direction to find intersections with geometry.

A virtual pointer through the scene

A ray has a starting point and direction; it is not a visible laser unless the application draws one. A 3D editor can use it to determine which object lies under the cursor. An XR controller can use a similar principle to point at a button or artwork. The renderer or interaction code decides which objects are eligible for the test.

An intersection is a placement candidate, not a guarantee of persistent alignment. Play the short loop to compare the movement.

It only tests geometry it knows about

Casting a ray through a virtual scene does not automatically detect a physical wall seen by the camera. The application needs a representation of that wall, supplied by a spatial system or another source. Transparent appearance does not necessarily make an object unselectable either: picking rules and material transparency can be handled separately.

A useful distinction for interactive art

When specifying an interaction for a Painta experience, distinguish “tap this digital object” from “find a point on the real floor.” Both may involve a ray, but their data and support requirements differ. The diagram shows a ray intersecting an estimated plane. The intersection provides a candidate point; deciding what to do there is a separate part of the experience design.

Related concepts and further reading

Three.js: Raycaster