https://arcade.makecode.com/S64205-17997-13010-55878 can you help with makeing my gravity and jump physiscs work?
3 Likes
What you need to do is set the Y acceleration, not the Velocity. Velocity is the movement speed, but acceleration is how much the speed increases over time.
2 Likes
For gravity:
1- Pick this block from the physics section on sprites tab
2- click on it to change it to the Acceleration Y setting, then set it to your liking (600 should work fine)
For jumping:
This should work with a little tuning in the numbers:
If you only want your sprite to move left-right, set the second value on the move with buttons block to 0.
Hope this helps!
1 Like
FIRST OF ALL
Use AY instead of VY for your gravity
SECOND OF ALL
Set the VY in the move sprite block to 0
THIRD OF ALL
I didn’t check enough to see you have a jump mechanic
2 Likes