Nebula
Loading...
Searching...
No Matches
Physics::ShapeCastHit Struct Reference

#include <scenequery.h>

Detailed Description

A shape cast hit.

Note
The field order is the layout the C# mirror is generated from, so both sides have to be synced. This is the same order as Physics::RaycastHit, which is what keeps the two mirrors the same size.
Distance is the distance the query shape travelled, measured from its pose origin rather than from its surface, so a shape reports a hit before its surface reaches the target. A radius 1 sphere whose center is 5 from a surface reports distance 4. The point is the contact point, which is a different number. A shape that already overlaps geometry at the start reports distance 0, and its normal is the reverse of the direction the cast was travelling in, which is the convention PhysX uses for an initial overlap.
The distance is what PhysX computed, not an exact geometric distance. A box against a box uses a small edge tolerance, so a box cast is a few thousandths short.

Public Attributes

uint64_t entity
uint32_t shapeId
float distance
Math::vec3 point
Math::vec3 normal
uint32_t faceIndex

Member Data Documentation

◆ distance

float Physics::ShapeCastHit::distance

◆ entity

uint64_t Physics::ShapeCastHit::entity

◆ faceIndex

uint32_t Physics::ShapeCastHit::faceIndex

◆ normal

Math::vec3 Physics::ShapeCastHit::normal

◆ point

Math::vec3 Physics::ShapeCastHit::point

◆ shapeId

uint32_t Physics::ShapeCastHit::shapeId

The documentation for this struct was generated from the following file: