Discuss Scratch

Crispydogs101
Scratcher
1000+ posts

How do I make a platormer character jump and hit the ground smoothly?

Title. Also in a way it's easy to understand.
Because the characters keeps on colliding on the floor.

Last edited by Crispydogs101 (July 12, 2023 22:04:38)

PhiPhenomenon
Scratcher
500+ posts

How do I make a platormer character jump and hit the ground smoothly?

What does smoothly mean?

Also, we can't help you if we can't see what you have so far.
Crispydogs101
Scratcher
1000+ posts

How do I make a platormer character jump and hit the ground smoothly?

PhiPhenomenon wrote:

What does smoothly mean?

Also, we can't help you if we can't see what you have so far.
Basically it hits the ground without being in the ground.

Also https://scratch.mit.edu/projects/799075295

Last edited by Crispydogs101 (July 12, 2023 22:56:28)

PhiPhenomenon
Scratcher
500+ posts

How do I make a platormer character jump and hit the ground smoothly?

This is a basic script:

It doesn't handle wall collisions, I can add that when you need it.
UnconstructivePoster
New Scratcher
100+ posts

How do I make a platormer character jump and hit the ground smoothly?

I'd strongly suggest looking at some platformer tutorials, especially if you want to also add other features like realistic gravity and smooth acceleration in addition to fixing this issue. You could probably adapt the scripts to work for micro:bit by using <tilted (right v)?> and <tilted (left v)?> instead of <key (left/right arrow v) pressed?>.
Crispydogs101
Scratcher
1000+ posts

How do I make a platormer character jump and hit the ground smoothly?

PhiPhenomenon wrote:

This is a basic script:

It doesn't handle wall collisions, I can add that when you need it.
Alright good to know.
Crispydogs101
Scratcher
1000+ posts

How do I make a platormer character jump and hit the ground smoothly?

It works! Tysm guys!
Crispydogs101
Scratcher
1000+ posts

How do I make a platormer character jump and hit the ground smoothly?

I think now is a good time to add wall collisions
PhiPhenomenon
Scratcher
500+ posts

How do I make a platormer character jump and hit the ground smoothly?

You're going to need to share the project again so we can give code that works on your project.

Powered by DjangoBB