GML Making Instance follow camera?

Discussion in 'Programming' started by Amon, Oct 11, 2019.

  1. Amon

    Amon Member

    Joined:
    Sep 13, 2016
    Posts:
    272
    I have a power meter that is created as a series of boxes. This power meter sets the speed of my character. How do I make it move with the camera or place it in the GUI layer so that it follows the camera?
     
  2. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,525
    If you draw it in the GUI Layer it won't move when the camera moves, it will always be in screen space where 0,0 is top left and view_width, view_height is the bottom right and will stay in position no matter how the camera / view is moved within the room.
     
    Bentley, ParodyKnaveBob and Amon like this.
  3. Amon

    Amon Member

    Joined:
    Sep 13, 2016
    Posts:
    272
    Thank you dude. That worked fine.
     
    ParodyKnaveBob and rIKmAN like this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice