How to keep HUD moving with camera?

Hello people, I'm somewhat of a newb here.
And so my problem:

The size of the scene is big enough to for the camera to scroll around.

Basically, my stick figure actor has the camera control. However, the move/jump button actors, do not have the camera control, and I am well aware that only one actor can have the camera control.

When my stick figure walks far enough to the point where the camera moves, the move/jump buttons do not follow with the stick figure/camera/scene. I have tried multiple solutions, and nothing seems to be working?

Here is my attempted rule at "constraining" (however that function works...) the *jump button* to the camera (or "screen"?)

-------------------------------------------
When all of the following are happening:
If self.position.x = 68 ..... *which is where my button
If self.position.y = 5 ....... is positioned on the screen*

Do>
constrain: self.position.x TO: self.position.x
constrain: self.position.y TO: self.position.y
---------------------------------------------
Eh this is what a newb comes up with lol
Simply put, it does not work. It makes sense, assuming the x68 and y5 is where the scene is, not where the "screen" is.
I'm lost, honestly.

Any suggestions?
I may or may not have my terminology mixed up, so feel free to explain anything if needed.
Thanks.




Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Simply put your HUD actors on a seperate layer and uncheck "scrollable."
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Simply put your HUD actors on a seperate layer and uncheck "scrollable."
    what he said :)
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    To add to that, your HUD actors on an unscrollable layer do not need any constrain behaviors or anything else to keep them in place. By unchecking that box, they will stay wherever you placed them on the scene relative to the viewable area of the screen.
  • MuphinsMuphins Member Posts: 7
    Word. Thanks people
    Such simple solutions...

Sign In or Register to comment.