Download

Pointing Weapon in Mouse Direction in RTS.

Question. I have a character holding a gun in a top down RTS. The gun spawns and attached to a socket on the character called 'Weapon". Works great. My character has a tick to “SetActorRotation” via “Find Look at Rotation” with a “Get Hit Result Under Cursor by Channel” to rotate to the mouse pointing direction. Also works great. My character also has a “SetActorRotation” using the same setup, but for some reason the gun only rotates left or right and ignores up/down. What is preventing the up/down rotation to work? All 3 axis are connected correctly.

See if this tutorial helps you: UE4 - Rotate Character To Look At Mouse Location (Top Down) - Dream Bot Studios