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

High-Speed Collision Detection Limitation #6491

Closed
1 task done
FrostyFlame1 opened this issue Mar 31, 2024 · 3 comments
Closed
1 task done

High-Speed Collision Detection Limitation #6491

FrostyFlame1 opened this issue Mar 31, 2024 · 3 comments

Comments

@FrostyFlame1
Copy link

FrostyFlame1 commented Mar 31, 2024

Is there an existing issue for this?

Describe the bug

When the speed of objects is significantly increased, the collision detection fails. In my case the issue begins to occur when I set the scale to around 71 pixels per meter. Despite using the bullet option and implementing raycasting, the issue persists.

Steps to reproduce

link to the game: https://gdevelop.io/game-example/free/spherez

GDevelop platform

Desktop

GDevelop version

5.3.195

Platform info

No response

Additional context

No response

@AlexandreSi
Copy link
Collaborator

Hi @FrostyFlame1,
Thanks for opening an issue.
I'm not surprised by this result: there is a compromise to find between a performant game and a correct simulation. And if the speed is significantly increased, this compromise might not be satisfying.
Have you seen a different result in other engines?

If you want to discuss about the values between the word "significant", I recommend you publish a game on gd.games with a control on the scale and a test case so that we can have solid grounds during the discussion.

@tristanbob
Copy link
Contributor

@FrostyFlame1 I'm the one who made that Spherez template, which uses the Physics behavior (powered by Box2d)

Box2d uses continuous collision detection (CCD) for dynamic objects against static objects, so it should never miss.
The "bullet" setting also enables this CCD between other dynamic objects.

What do you mean by "collision not detected"? Are you using Physics collision or non-physics collision conditions? The non-physics condition only triggers when the objects happen to be touching during the frame (no CCD). My first guess is that you are using the wrong condition.

@FrostyFlame1
Copy link
Author

I am using the Physics collision condition. When I changed the position of the specified event, the issue was resolved. So, the issue is not caused by the physics engine.

I deeply apologize for reporting this as a bug. and I am so grateful for your time and assistance.

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

No branches or pull requests

3 participants