GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Touch Jumping

New to Gamesalad, trying to put a basic game together for a uni project and am struggling to get the jumping down.
I have a vertical scrolling game, where the actor is falling (used an accelerate behaviour) and would like to have the player keep the actor up.

I would like the actor to 'jump' and rotate based on the side of the screen that is pressed.
Something like this (image stolen / edited from elsewhere)

Like I said, completely new to gamesalad and any help would be greatly appreciated

Thanks

Comments

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

    My guess would be to increase/decrease the actor's horizontal velocity based on where the touch occurs. You can use the mouse position (in the Devices area of the attribute browser) to determine where the player taps and then compare it to the actor's position (e.g. <, >, or = to the center of the actor). You'll need to include some leeway (e.g. it's almost impossible to tap directly on a pixel so if the actor is at x=150, you might allow for tapping at x<170 AND x>130).

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.