Screen coordinates not game coordinates
-
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!
-
Post yer code! :)
-
@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).
-
It worked I just had to put the setspritecamera function in my draw inventory function thanks so much
-
@poof92 You're very welcome! Glad I could help.