problem with moving and jump with gravity at same time
![praj](https://images.v-cdn.net/banned_large.png)
and also my character does not move down when in air while clicking right/left. if i dont click anything, it is perfect but that defeats the purpose of this like jumping over enemy. meaning if i click up button then left or right button then the character will move in same line. if i let go then it will fall. Also when i dowble click up, it will go higher each time.
Answers
Gravity is set to 0 in both X and Y.
To control the player Motion.Linear.Velocity is used both for LEFT, RIGHT and JUMP.
The Accelerator behaviour is to "push" down the player.
The player can be moved in the air.
Limited to only make a "single" JUMP. When touching "Ground" you can JUMP again.
HC
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
To answer your question, make 3 boolean attributes "Go Right", "Go Left" & "Jump".
Make 3 actors, one for each direction.
Add a RULE - When Touch is PRESSED:
Change Attribute: Go Right to TRUE
OTHERWISE:
Change Attribute: Go Right to FALSE
Do this for all 3 directions and change from KEY PRESSES in the PLAYER-actor to the direction attribute.