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.

VariableTypeDescription
nodeZ.ObjectThe node the raycaster is colliding with.
distancenumberThe distance from the raycaster to the colliding node, in the raycaster’s coordinate space.
raycasterZ.RaycasterThe raycaster which is colliding with the node.
localPositionnumber[]The position of the collision point in the local coordinate system of the colliding node.