• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!

GMS 2 Shaking and tearing objects when view moves too fast


Hello. I'm working on a space themed game where the camera follows the player but the obj_player goes at such fast speeds that the interface UI windows (which can be dragged and moved with the mouse) that follow the camera view start to shake when when I click and drag them across the screen when the obj_player is in movement. This issue doesn't happen when the obj_player is still. Now I managed to solve the initial problem with a controller object which tells the window object using a "with" statement to tell it's position in the view in an "End step" event. This solves the problem only if the obj_player has a low speed and the bar is not being dragged with the mouse but eventually the problem reappears when speed reaches say more than 70 something. The distance that the obj_player travels is huge and the camera follows the player outside of the room btw. Anyone know a way I can resolve this issue? I'm pretty sure the code is ok since everything works well as long as the speed is smaller. I'm designing the UI windows to be movable similar to those in Superpower 2 or OpenTTD. Thanks in advance. Cheers :)

The grey bar is the window top tab:

The end step code in the obj_controller that solved the first part of the problem: