Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Screen coordinates not game coordinates

    Beginners
    3
    5
    412
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • poof92
      poof92 last edited by

      I made an inventory system but once the screen moves the coordinates for the detection box and the pointer which I use as a cursor the both move!

      Dave 1 Reply Last reply Reply Quote 0
      • PickleCatStars
        PickleCatStars F last edited by

        Post yer code! :)

        1 Reply Last reply Reply Quote 0
        • Dave
          Dave Fuze Team @poof92 last edited by

          @poof92 It sounds like you need to include the camera position in the drawing of the detection box and pointer!

          Usually this is something like: pointer.x - cam.x, pointer.y - cam.y.

          If you are using sprites, another thing you can do is to make the cursor and detection box a sprite as well. This way, they will be affected by the sprite camera. (This is only if you are using the sprite system and camera).

          1 Reply Last reply Reply Quote 0
          • poof92
            poof92 last edited by

            It worked I just had to put the setspritecamera function in my draw inventory function thanks so much

            Dave 1 Reply Last reply Reply Quote 1
            • Dave
              Dave Fuze Team @poof92 last edited by

              @poof92 You're very welcome! Glad I could help.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post