Uploaded November 2021 | Updated November 2026, 3 hours ago
To make navigation and interactive 3D objects, Cast Ray operator is a great solution. We take a look at how the operator works, how to set it up, and create a small example.
0:00 - intro
0:20 - example setup overview
0:52 - Cast Ray parameters overview
1:29 - setting up Cast Ray
2:04 - adding World to the setup
2:32 - adding Physics Cube to the World
2:50 - matching physics cage to your visible objects
3:55 - how to check Cast Ray object picking
4:22 - using Mouse operator for Cast Ray target location
5:02 - Cast Ray normalized coordinates requirement
5:26 - checking Cast Ray outputs for intersection with object
5:52 - Cast Ray "has hit" output
6:30 - setting name of physics object for checking selection
7:13 - using If Then statement to select physics object
8:00 - using Boolean to trigger an animation
10:11 - Cast Ray and 3d perspective and object occlusion
11:31 - some more Cast Ray output parameters
Documentation Page for Cast Ray:
cables.gl/op/Ops.Physics.CastRay
Documentation Page for Physics Cube:
cables.gl/op/Ops.Physics.Body.PhysicsCube_v2
Documentation Page for physics World:
cables.gl/op/Ops.Physics.World
check out the Bool Anim byte size tutorial here:
youtube.com/watch?v=BzYl9lujqmg
New to cables.gl? check out our channel and start creating your own WebGL projects for free
cables.gl
To make navigation and interactive 3D objects, Cast Ray operator is a great solution. We take a look at how the operator works, how to set it up, and create a small example.
0:00 - intro
0:20 - example setup overview
0:52 - Cast Ray parameters overview
1:29 - setting up Cast Ray
2:04 - adding World to the setup
2:32 - adding Physics Cube to the World
2:50 - matching physics cage to your visible objects
3:55 - how to check Cast Ray object picking
4:22 - using Mouse operator for Cast Ray target location
5:02 - Cast Ray normalized coordinates requirement
5:26 - checking Cast Ray outputs for intersection with object
5:52 - Cast Ray "has hit" output
6:30 - setting name of physics object for checking selection
7:13 - using If Then statement to select physics object
8:00 - using Boolean to trigger an animation
10:11 - Cast Ray and 3d perspective and object occlusion
11:31 - some more Cast Ray output parameters
Documentation Page for Cast Ray:
cables.gl/op/Ops.Physics.CastRay
Documentation Page for Physics Cube:
cables.gl/op/Ops.Physics.Body.PhysicsCube_v2
Documentation Page for physics World:
cables.gl/op/Ops.Physics.World
check out the Bool Anim byte size tutorial here:
youtube.com/watch?v=BzYl9lujqmg
New to cables.gl? check out our channel and start creating your own WebGL projects for free
cables.gl










