The ball works like a Sprite except you can use the center coordinates of the ball. When you use a sprite, the app 'thinks' the coordinates of the sprite is the coordinates of the top left corner. You need to consider that when programming sprite behavior. You can compensate for the fact you don't have use of the sprite's center unless you provide code to shift the left corner by realizing its center is 1/2 the width of the sprite and 1/2 the height .
There probably are several ways to make a sprite 'jump'.
To make the sprite go up and down you can use the ball.MoveTo a point yNow to yNow-number of pixels you want to jump. x can stay the same or be used to move the jumper to the right or left by adding or subtracting the number of pixels to move laterally. You might also use a Clock to cycle the action.
To get the effect you want you will need to experiment. Your idea might work. Why not try it?
I’m making a 2d game which I want the jump to feel like super smash bros jump or brawhalla jump, I don’t know why it doesn’t work or how to make it look good when it does work
I don’t understand why the jump code doesn’t work when the player is moving, the timer interval is 10 so it goes up smoothly, or is there a better way to code it and keep player control.
Thanks for that, I had that as my jump code for a while but it doesn’t feel natural it’s just teleporting, would there be a way using a timer that I can make the character move up let’s say 1 pixel with a time interval of 10? Would I have to do it a different way?
I’ve seen in unity tutorials people coding gravity and people recommending gravity code to make physics in my 2d platformer I’m coding. Does anyone have any idea how I could go about coding gravity without chang8ng the sprites heading and giving the player as much movement control as possible. (preferably like brawhalla or super smash bros movement)
TimeInterval of 10 ms? Not really practical with App Inventor's slow graphics. 300 ms is ave. duration of an eyeblink. You would make your device cpu cry. Regarding ' doesn’t feel natural it’s just teleporting,' .. how should the ball jump naturally. Provide an example.