Keeping Actor in a linear movement

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:)


  • SocksSocks London, UK.Member Posts: 12,822

    When touch is pressed
    --Constrain self.postion.Y to mouse.position.Y

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,948

    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

  • eblancaslopezeblancaslopez Member, PRO Posts: 3

    Thank you so much! Ill try that @tatiang and @Socks !! I really appreciate it!

Sign In or Register to comment.