Gun wont rotate to mouse outside of camera border?

My game is a 2D platform zombie shooter. My character has a gun that aims to the position of the mouse. Everything works fine until my character leaves the origin of the camera. The games size is 4000w by 1000h but the camera size is 480 by 320. You probably know that when your working on the game, on your game screen you can see the border of the camera, well when you play it and my character walks out of that border my gun wont rotate/aim correctly anymore, and I have control camera set to it. Please let me know why this is. Thank you!

Comments

  • Bako.CoBako.Co Member Posts: 4

    And if anyone needs a picture to understand what im talking about just ask. Thanks again!

  • SocksSocks London, UK.Member Posts: 12,822

    @Bako.Co said:

    Point the gun at:

    Mouse X + Camera.Origin X
    Mouse Y + Camera.Origin Y

    (you will need to unlock the gun actor to be able to access the camera attributes).

Sign In or Register to comment.