How can I get the angle of a surface using raycasting?
https://developer.playcanvas.com/en/api/pc.RaycastResult.html
Raycast result contains the entity from the collision test, the normal and the point of hiit. You can use a normal to find the angle. A dot product of 2 normalized vectors would give you what you want.
3 Likes
i really need this right now it used to work in the past but i forgot how can you give me a example real quick?
In the post below you can find an example project.
1 Like