360 Movement gun (Sprite)- Correct Facing

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hi,


    I'ved done a few searches (google, youtube, here) and unable to solve a issue with my 360 movement/direction with a gun sprite. It follows mice fine, but when mouse moves to left side of screen (x) the gun is upside down.. I've trial and error various code but no fix.

    Anyone able to help, assuming some sort of calculation is required?!?

    Hopefully images work to show... gun is basically upside down!

    Please login to see this attachment.Please login to see this attachment.
  • There's a couple ways you could do it

    - Have a second version of the sprite (in another animation frame or another direction) with the same image flipped upside down - then change the sprite depending on whether the crosshair's X position is further left or right than the player

    - Use a shader to vertically flip the sprite depending on the the crosshair's position

  • Hey, Thanks!


    I got it working to left now, using the below... but now when my crosshair moves back to the right its wrong way that side... how do I get it working the other side now? Flipping it again don't fix it.


    - Use a shader to vertically flip the sprite depending on the the crosshair's position

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!