Documentation / Node reference / code nodes

code/CursorRay

The ray from the active camera through the pointer, in world space.

Geometry

This is the 3D counterpart of code/Cursor: rather than where the pointer is on screen, it is the line through the scene that the pointer picks out. On its own a ray is not a position, because every point along it is under the cursor. To get one position you have to say where to stop, which is what code/Plane and code/RayPlaneIntersect are for: a ground plane plus this ray is an object that follows the cursor. It is the same ray the hover events raycast with, taken once per frame.

Previous is the same ray from the frame before. A pointer moving quickly covers real ground between two frames, so acting only on the ray it is on right now leaves gaps; code/RayClosestPoint takes both and works with the fan swept between them.

Works inside a geo/Actor and inside the shader builders (material, texture and compute networks).

Examples

Scenes you can open in the editor that teach this node.

This page is generated from the engine, so it describes the release you can download. The same text is in the editor's Help panel next to the node itself.