Intersect faces with raycaster

Hi guys,
I was wondering if it’s possible to use a raycaster to intersect a 3D model and then get the intersected face(s). My usecase is: I have a model of a historic building and I want to define areas (groups of faces) where the user can hover/click to get specific information about that certain detail. I did a similar raycaster approach recently in three.js and was wondering how to do it with playcanvas. Or if you have another approach, please shoot :smiley:

Thanks in advance!

Hi @patriboz,

Right now the rigidbody raycaster will return the position/normal/entity of any hit happening.

There is a pull request in the Playcanvas engine to provide a raycaster that can work without using physics, by scanning the triangles. You can post your request there, it’s a valid use case:

1 Like

Thank you @Leonidas.
I will do that.

1 Like