Hey guys,
how to get the first object ray beam collision with it ? (not another objects such as objects are in back side of front object).
rollout myrollout "hover" (
listbox lb
local theTimer = dotNetObject "System.Windows.Forms.Timer"
fn showundermouse=
(
-- RAYCASTIN JOOOOOOOOOOOOOB HERE
ry = mapScreenToWorldRay mouse.pos
myray=ray ry.pos ry.dir
local intersect = intersectRayScene myray
if intersect.count>0 then
(
print intersect[1][2].pos
)
)
on myrollout open do
(
dotnet.addEventHandler theTimer "tick" showundermouse
theTimer.interval = 100
theTimer.start()
)
on myrollout close do
(
theTimer.stop()
theTimer.dispose()
)
)
createdialog myrollout