Im attempting to make a game where you play as a drone. There is supposed to be a gun attached underneath this drone (For now it is just a rectangular prism).
The issue is that I need to have this gun point at the mouse cursor, and it works partially. The cube has no problem of pointing up when my cursor is looking at something at the top of the screen, but when I point down, once the gun is parallel to the drone it stops rotating until I raise my cursor again.
What I’ve tried is getting the mouse position by using the “Get Hit Result Under Cursor By Channel” Node, and then using the “Find Look at Rotation” to get the rotator and I’ve tried plugging it into “Set World Rotation” and “Set Relative Rotation”.
This is my first project on Unreal Engine 5 and I have been stuck on this for very long, Please Help Me!
