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.