Document raycasting

This commit is contained in:
Dane Johnson committed 2021-04-21 21:30:48 -05:00
1 parent fa20631e7b
commit c68ee69c9b
2 files changed
+10 -1

No files matched your search

+1 -1
View File
@@ -37,7 +37,7 @@ function onkey(key, code, action, mod)
local res = couch.World.GetWorld():Raycast(camera_transform.position,
camera_transform.position + camera_transform:Forward() * 100.0)
if (res.hit) then
res.object:ApplyImpulse(res.normal * -100.0)
res.object:ApplyImpulse(camera_transform:Forward() * 100.0)
end
end
end