Interface ShapeCastResult
interface ShapeCastResult {
fraction: number;
hasHit: boolean;
hitNormal: Vec3;
hitPoint: Vec3;
inputHitNormal: Vec3;
inputHitPoint: Vec3;
}
fraction: number;
hasHit: boolean;
hitNormal: Vec3;
hitPoint: Vec3;
inputHitNormal: Vec3;
inputHitPoint: Vec3;
}
Properties
fraction
fraction: number
Fraction along the sweep (startPosition→endPosition) where contact first occurs.
has Hit
hasHit: boolean
Whether the swept shape hit a body.
hit Normal
Surface normal at the hit-body contact.
hit Point
Contact point on the hit body (world space).
input Hit Normal
Surface normal at the swept-shape contact.
input Hit Point
Contact point on the swept shape (query-shape space).
Result of a shapeCast query.