Keeping Actor in a linear movement
eblancaslopez
Member, PRO Posts: 3
Hi Everyone!
I am new to all of this and have managed to figure out how to make everything work by watching youtube channels.
BUT I can not find how to move an actor up and down with touch and drag! Also to only keep this actor on the edge of the screen. Who ever has the time to help, please do! I am desperate. I had it down by using keys but realized that in order for my game to work on iOS and android i had to change the way i was moving my actors. so pleeaaaassseeee somebody....anybody.. HELP!! thank you:)
Comments
When touch is pressed
--Constrain self.postion.Y to mouse.position.Y
To keep the actor on the edge of the screen, place the actor there. If you only constrain the Y position (as @Socks suggested) and do nothing to the X position, the actor will stay there.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thank you so much! Ill try that @tatiang and @Socks !! I really appreciate it!