I'm trying to detect which game object (if any) is under the mouse, and use that information for other FSMs. But I can't seem to get my ray to move "towards" the mouse - instead it just shoots off from my camera in a random direction.
I track the mouse position's every frame and supply this information to the raycast action's "direction" field, but all this does is cause the ray to rotate randomly as I move the mouse (img 01). I did some reading about "screen to world point" - but when I convert the mouse position into a world point, and then use the world point as the ray direction, the ray just stays frozen, even when I move the mouse (img02).
Totally stumped here, hopefully I'm just setting this up incorrectly? Grateful for any guidance!