I have a game where you hover the mouse on an area, and it spawns 1 object whos y and x every tick are the mouse position. I noticed that if I go too fast while the object is spawning, it will just spawn in a different position than the mouse and follow every tick that position.
The player tries to place that object on the map but the mouse goes out of the game screen so it is impossible to place it there. Also the game doesn'tt play on fullscreen or even stretched, I designed it that way.
This game is about speed so going fast is crucial to the gameplay, it even has a timer.
Question: How can I make it that when the object recognizes a different positiion as xy of mouse, comes to the real position. The object is a little big, but it is supposed to spawn in the middle of that object anyway. I don't understand why this is happening.
Thank you for reading!
Develop games in your browser. Powerful, performant & highly capable.