Skip to content

IntersectionEvent

Studio is being deprecated, please head over to the documentation page for Mattercraft, our most advanced 3D tool for the web, where you can find the most recent information and tutorials.

interface IntersectionEvent {
node: Z.Object;
distance: number;
raycaster: Z.Raycaster;
localPosition: number[];
}

Collision information between a raycaster and a node.

Variable Type Description
node Z.Object The node the raycaster is colliding with.
distance number The distance from the raycaster to the colliding node, in the raycaster’s coordinate space.
raycaster Z.Raycaster The raycaster which is colliding with the node.
localPosition number[] The position of the collision point in the local coordinate system of the colliding node.