Kemena3D
Loading...
Searching...
No Matches
kemena::kPhysicsRaycastHit Struct Reference

Result of a physics raycast query. More...

#include <kphysicsmanager.h>

Collaboration diagram for kemena::kPhysicsRaycastHit:

Public Attributes

bool hit = false
 true if the ray struck a body.
float distance = 0.0f
 Distance from the ray origin to the hit point.
kVec3 hitPoint
 World-space position of the intersection.
kVec3 hitNormal
 World-space surface normal at the hit point.
kPhysicsObjectobject = nullptr
 The physics body that was hit (manager-owned).

Detailed Description

Result of a physics raycast query.

Returned by kPhysicsManager::raycast(). Check hit before accessing any other field.

Member Data Documentation

◆ distance

float kemena::kPhysicsRaycastHit::distance = 0.0f

Distance from the ray origin to the hit point.

◆ hit

bool kemena::kPhysicsRaycastHit::hit = false

true if the ray struck a body.

◆ hitNormal

kVec3 kemena::kPhysicsRaycastHit::hitNormal

World-space surface normal at the hit point.

◆ hitPoint

kVec3 kemena::kPhysicsRaycastHit::hitPoint

World-space position of the intersection.

◆ object

kPhysicsObject* kemena::kPhysicsRaycastHit::object = nullptr

The physics body that was hit (manager-owned).


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