raycastClosest#
Fully qualified name: isaacsim::physics::manager::raycastClosest
- bool isaacsim::physics::manager::raycastClosest(
- const isaacsim::physics::registration::Float3 &origin,
- const isaacsim::physics::registration::Float3 &unitDirection,
- float distance,
- registration::RaycastHit &hit,
- bool bothSides,
Finds the closest raycast hit across all active physics backends.
Note
Exceptions that escape a backend query callback propagate to the caller and prevent dispatch to later backends.
- Parameters:
origin – [in] Ray origin in world coordinates.
unitDirection – [in] Normalized ray direction.
distance – [in] Maximum ray distance in scene length units. Must be nonnegative.
hit – [out] Closest hit. The value is modified only when the function returns
true.bothSides – [in] Whether both sides of mesh triangles participate in the query.
- Returns:
trueif the ray hit an object; otherwise,false.