Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Intersection

struct in Physics

Description

A ray intersection result.

Fields

NameTypeDescription
colliderNode

A handle of the collider with which intersection was detected.

normalVector3

A normal at the intersection position.

positionVector3

A position of the intersection in world coordinates.

featureFeatureId

Additional data that contains a kind of the feature with which intersection was detected as well as its index.

Important notes.

FeatureId::Face might have index that is greater than amount of triangles in a triangle mesh, this means that intersection was detected from “back” side of a face. To “fix” that index, simply subtract amount of triangles of a triangle mesh from the value.

toifloat

Distance from the ray origin.