GMS 2 Shaking and tearing objects when view moves too fast

depepe

Member
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:
1606821899966.png

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

1606822076425.png
 
Top