How to keep HUD moving with camera?
Muphins
Member Posts: 7
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.
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
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Such simple solutions...