Basically I'm trying to figure out how to make a button, that you can interact with that shows above the GUI draw event and locks perfectly to the screen.

The current draft I have the button is below the GUI layer so I need it above

The button is functional so thats good

The button does not lock perfectly to the screen when the camera stops it lags behind and has to catch up to the camera no matter what direction I move, I dont want the player to see the button actually following I want all the parts to move seamlessly together.

This is a gif of whats happening

  • \$\begingroup\$ I'm having trouble figuring out what's your issue: you said your buttons 'follow' the camera rather than being perfectly locked to the GUI; on the other hand, I see nothing wrong in the GIF you attached. \$\endgroup\$ – liggiorgio Apr 1 '18 at 20:18
  • \$\begingroup\$ I solved the text problem Im trying to figure out how to make the button object follow the camera like the GUI does and be above the GUI layer I have a button in the room in a step event addstoneguys.x=view_xview[view_current]+8 addstoneguys.y=view_yview[view_current]+16 but the object lags behind the camera movement then snaps after i let off the key I cant draw it because it just draws a sprite not the actual useable button \$\endgroup\$ – Matt Begley Apr 2 '18 at 22:11

The only thing you need to do is make sure you first move your View around (the "camera"), then you can place the buttons at their relative position to the View. Once you're done with moving the View around, you can be sure there will be no jittering for objects following the View.

Try to change the Step Event with End Step Event, so that the button is moved toward the camera after the View has moved.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.