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

Implement priority order of collision solving in StaticBody #3065

Closed
Tracked by #50732
TokageItLab opened this issue Jul 31, 2021 · 1 comment · Fixed by godotengine/godot#64343
Closed
Tracked by #50732

Implement priority order of collision solving in StaticBody #3065

TokageItLab opened this issue Jul 31, 2021 · 1 comment · Fixed by godotengine/godot#64343
Milestone

Comments

@TokageItLab
Copy link
Member

TokageItLab commented Jul 31, 2021

Describe the project you are working on

3D Character Game

Describe the problem or limitation you are having in your project

For RigidBody and CharacterBody, you can solve the priority order of collision solving with infinite_inertia in certain extent. However, in the current collision between StaticBody and CharacterBody, there is no priority order for collision solving. For example, objects such as moving platforms and vehicles are essentially StaticBody, but terrain is also a StaticBody. This means that when a CharacterBody is sandwiched between terrain and moving platforms, the CharacterBody can easily be buried in the terrain.

2021-07-31.12.17.12.mov

Describe the feature / enhancement and how it helps to overcome the problem or limitation

In that case, the ideal condition is to be buried in the moving scaffolding, but not in the terrain. I think this can be solved by implementing a priority of collision solving.

See also #3066.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Implement priority order of collision solving in StaticBody inspector

If this enhancement will not be used often, can it be worked around with a few lines of script?

No

Is there a reason why this should be core and not an add-on in the asset library?

It needs to be included within the GodotPhysics

@pouleyKetchoupp
Copy link

Definitely makes sense to have this feature, I don't see any easy way to do it by script otherwise.

It would be probably on PhysicsBody directly, in order to also handle other types of bodies, like characters pushing other characters into walls.

I'm not sure at this point if it could affect only character motion, or also rigid bodies in the physics simulation (so characters would also not push rigid bodies through walls). That would need more experimentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Implemented
Development

Successfully merging a pull request may close this issue.

3 participants