-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.GetRayCollisionMesh
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Get collision info between ray and mesh
| Parameter | Default Value | Note |
|---|---|---|
| ray | ||
| mesh | ||
| transform | MatrixIdentity |
| Condition | Return Value |
|---|---|
| (always) | map |
ray = {position:[0,5,0], direction:[0,-1,0]}
mesh = raylib.GenMeshCube(2, 2, 2)
rc = raylib.GetRayCollisionMesh(ray, mesh, raylib.MatrixIdentity)
if rc.hit then
print "Hit mesh at distance: " + rc.distance
end if
raylib.UnloadMesh mesh