Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Character falls through floor when falling at high speed #697

Open
ewokdanceparty opened this issue Mar 24, 2023 · 5 comments
Open

Character falls through floor when falling at high speed #697

ewokdanceparty opened this issue Mar 24, 2023 · 5 comments
Projects

Comments

@ewokdanceparty
Copy link

ewokdanceparty commented Mar 24, 2023

Hi all, in my game I would like each jump to last 0.25 seconds. The problem is, when I tune gravity and jump speed for that air time, the character sometimes falls through the floor. I would like this not to happen in my game. This appears to be a bug, but maybe there's a way to mitigate this without changing the source code?

To replicate, go to:

On https://3000.kaboomjs.com/play?example=platformer

Set the following parameters:

setGravity(30000)
JUMP_FORCE = 3750

And then try jumping.

(I normally set gravity and jump speed to half those values, but then the character will only occasionally fall through the floor. If I don't set gravity and jump speed to be fairly high, I can't get a jump with a satisfying height that lasts 0.25s).

This appears similar to an issue that was closed in 2021.

Thank you!

@slmjkdbtl slmjkdbtl added this to Feature requests in 3000 Apr 12, 2023
@slmjkdbtl slmjkdbtl moved this from Feature requests to Bugs in 3000 Apr 12, 2023
@gunikas
Copy link

gunikas commented Apr 15, 2023

I have a similar problem with the play character falling through the ground occasionally. gravity is just set to 3000

@slmjkdbtl slmjkdbtl moved this from Bugs to Feature requests in 3000 May 19, 2023
@slmjkdbtl slmjkdbtl moved this from Feature requests to Bugs in 3000 May 19, 2023
@slmjkdbtl slmjkdbtl moved this from Blocking tasks to Tasks in 3000 May 19, 2023
@qsun81
Copy link

qsun81 commented Jun 15, 2023

same here. gravity is set to 2000, but my character falls down through the platform.

@dratner
Copy link

dratner commented Jul 9, 2023

+1

@pjoe
Copy link
Contributor

pjoe commented Jul 11, 2023

Seeing this also, toying with a platformer, but when player falls off platform and keeps falling long enough velocity gets high enough (because of gravity) that the player falls right through lower platforms. Is there alternatively a good way to limit the max speed of e.g. a falling player?

EDIT: using ver. 3000.0.14

@ganevdev
Copy link

Seeing this also, toying with a platformer, but when player falls off platform and keeps falling long enough velocity gets high enough (because of gravity) that the player falls right through lower platforms. Is there alternatively a good way to limit the max speed of e.g. a falling player?

EDIT: using ver. 3000.0.14

Here: https://kaboomjs.com/#BodyCompOpt there is maxVelocity param for body - I think with this you can set the maximum velocity that the body can have, drag and gravityScale parameters may also help with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
3000
Tasks
Development

No branches or pull requests

6 participants