Go to the source code of this file.
◆ RayCapsule()
Tests a ray starting at inRayOrigin and extending infinitely in inRayDirection against a capsule centered around the origin with its axis along the Y axis and half height specified.
- Returns
- FLT_MAX if there is no intersection, otherwise the fraction along the ray.
- Parameters
-
inRayDirection | Ray direction. Does not need to be normalized. |
inRayOrigin | Origin of the ray. If the ray starts inside the capsule, the returned fraction will be 0. |
inCapsuleHalfHeight | Distance from the origin to the center of the top sphere (or that of the bottom) |
inCapsuleRadius | Radius of the top/bottom sphere |