How to use raycasters?


#1

So i’m a bit new in AR and i’m trying to figured it out how to use raycasters with 3D models in zapWorks Studio. What i want to achieve is to play video or open website when raycaster interact with 3D model. Can somebody provide me an example or some help that i can use for achieving that.

Thanks and happy developing. :blush:


#2

Hi @XRdeveloper,

3D models don’t directly support raycaster events, so you won’t be able to make a raycast interact with them.

You can use an invisible Plane object placed in front of the 3D model to catch any intersection events instead.

The following articles from our documentation site have some extra information regarding the use of raycasters:

Part 5 of Transitioning Photospheres tutorial
Raycaster overview
Intersection events

All the best,
Seb


#3

Great solution, tenx👍