Download

Sidescroller 2.5D mouse aiming crosshair

Hello All!
Getting started with the Unreal 4 engine and as a beginner I have of course ran into some small issues.
I have followed several tutorials on aiming in sidescroller templates. Things are going well for the most part. However I’ve ran into an issue with aiming between my mouse cursor on screen (crosshair) and the scene component(aimingfrompoint) which is the component controlling my aim pitch and camera. It simply doesn’t line up over distance. The gun/pitch rises itself while my crosshair stays level on the screen. I’ve tried everything I can think of to get the tip of the gun(where my bullets come out) to aim directly at the mouse location on screen. I would also like the camera to extend itself out to the mouse location a bit. Ive noticed that can be done by moving the stationary scene component I’ve named (aimingfrompoint).
When taking a screenshot of the bullets in relation to the crosshair on screen. The screen shot erased the crosshair location so I edited it back in with MSpaint for reference.
I believe most of my issues would be solves if I could attach the (aimingfrompoint) to the mouse location on screen. So they move together giving me a result similiar to the following pictures. If anyone has any ideas or advice on how I can accomplish this I would greatly appreciate it! Thanks!


No ideas? :frowning:

The cosine angle between the two cursors is calculated through the cursor position and the role position?
then,
set character rot

Did you solve it? I have exactly the same issue and have been spending the last week trying to get it to work without success