Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

Objects sometimes fall into each other at low FPS #225

Open
Shatur opened this issue Mar 13, 2022 · 9 comments
Open

Objects sometimes fall into each other at low FPS #225

Shatur opened this issue Mar 13, 2022 · 9 comments
Labels
to-investigate This maybe a bug... but needs investigation

Comments

@Shatur
Copy link
Contributor

Shatur commented Mar 13, 2022

In my game, the character is represented as RigidBody::Dynamic and when linear velocity is applied to it, it sometimes falls into other objects at low FPS:
изображение
изображение

Steps to reproduce:

  1. Clone this repo: https://github.com/gardum-game/gardum
  2. Checkout to 2187ae14b5cebd72ab8939e85595de28a1516b51 (just in case).
  3. Run cargo run --features "gi" -- --preselect-hero North host (with enabled GI in debug mode you should have low FPS).
  4. Press Space to jump and see the character falls into the ground :D

I tried enabling continuous collision detection, as suggested in #199, but it didn't help.

@jcornaz jcornaz added the to-investigate This maybe a bug... but needs investigation label Mar 14, 2022
@jcornaz
Copy link
Owner

jcornaz commented Mar 14, 2022

thanks for the report, I'll try to look into it. Just a question, you say "at low FPS", how many FPS is that exactly?

@Shatur
Copy link
Contributor Author

Shatur commented Mar 14, 2022

~8 FPS

@Shatur
Copy link
Contributor Author

Shatur commented Mar 14, 2022

The lower the FPS, the more noticeable the effect. I can reproduce the issue at ~18 FPS (no GI), it's just less noticeable.

@jcornaz
Copy link
Owner

jcornaz commented Mar 14, 2022

Do you configure the PhysicsStep? Or is it the default?

@Shatur
Copy link
Contributor Author

Shatur commented Mar 14, 2022

No, I didn't configure it. I assume it is the default.

@Whimfoome
Copy link

Whimfoome commented Mar 27, 2022

I get the same issue even with high FPS, happens most of the times. You can see the bevy icon going sligthly through the floor. Friction and restitution both to 0 on the bevy icon and the floor.

2022-03-27.13-33-35.mp4

@jcornaz
Copy link
Owner

jcornaz commented Mar 28, 2022

I get the same issue even with high FPS, happens most of the times. You can see the bevy icon going sligthly through the floor. Friction and restitution both to 0 on the bevy icon and the floor.

Ah, but that is rapier behavior I think. Or can you observe better behavior when using rapier directly (without heron)?

@Whimfoome
Copy link

In rapier I get the same behaviour, maybe Continuous Collision Detection can fix that but I haven't tested, because rapier seems a lot more complex than heron, I would like to test CCD in heron, but I can't find documentation about it.

@jcornaz
Copy link
Owner

jcornaz commented Apr 21, 2022

In rapier I get the same behaviour, maybe Continuous Collision Detection can fix that but I haven't tested, because rapier seems a lot more complex than heron, I would like to test CCD in heron, but I can't find documentation about it.

I would like to eventually add first-class support for ccd in heron (#199). Until then, here is how you can enable it yourself: #199 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
to-investigate This maybe a bug... but needs investigation
Projects
None yet
Development

No branches or pull requests

3 participants