Classes¶
Physics/Raycast
Brief descriptions¶
Structures |
|
Encapsulates raycasting query settings. |
|
Encapsulates ray hit information. |
Detailed information¶
physics::RayCastQuery¶
engine/core/modules/physics/include/nau/physics/physics_raycast.h
-
struct RayCastQuery¶
Encapsulates raycasting query settings.
Public Members
-
uint32_t id = 0¶
-
math::vec3 origin¶
World coordinates of the ray start.
-
math::vec3 direction¶
Direction of the ray.
It is expected to be normalized.
-
TFloat maxDistance = eastl::numeric_limits<TFloat>::max()¶
Length of the ray. Anything beyond this length will not be reported as a hit.
-
eastl::vector<CollisionChannel> reactChannels¶
List of channels the ray should hit.
Empty list means the ray should hit any channel.
-
bool ignoreTriggers = false¶
Indicates whether the ray should ignore or hit triggers.
-
float debugDrawDuration = {0}¶
Duration for which the ray should be visualized.
Note
Drawing rays only works in Debug mode.
-
uint32_t id = 0¶
physics::RayCastResult¶
engine/core/modules/physics/include/nau/physics/physics_raycast.h
-
struct RayCastResult¶
-
Public Members
-
uint32_t queryId = 0¶
-
Uid sceneObjectUid = NullUid¶
Scene object body is attached to.
-
scene::ObjectWeakRef<physics::RigidBodyComponent> rigidBody¶
Physical body that caused the hit.
-
nau::physics::IPhysicsMaterial::Ptr material¶
-
math::vec3 position¶
Coordinates of the hit.
-
uint32_t queryId = 0¶