[SOLVED] Setting rotation by a vector

Here’s an example of setting the forward direction of an entity to look in the direction of the normal on the intersection point of a raycast: https://playcanvas.com/editor/scene/605466

This is from copying the lookAt code that I linked to earlier.

raycast-normal

3 Likes