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

GridMap: Fix physics_material property #90503

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

rburing
Copy link
Member

@rburing rburing commented Apr 10, 2024

Use computed bounce and friction, just like StaticBody3D already does.

Also don't rebuild all internals just to set two floats on each body.

Use computed bounce and friction, just like StaticBody3D already does.
Also don't rebuild all internals just to set two floats on each body.
@rburing rburing added this to the 4.3 milestone Apr 10, 2024
@rburing rburing requested a review from a team as a code owner April 10, 2024 19:52
@smix8
Copy link
Contributor

smix8 commented Apr 10, 2024

Reminds me that having a single physics material for the entire GridMap was a not very sound decision. Should have been really a property of the item.

@rburing
Copy link
Member Author

rburing commented Apr 10, 2024

@smix8 At least the property is called physics_material and not physics_material_override like on StaticBody3D.

It would be possible to add a per-item override. (I would wait for someone to propose it.)

Another idea I heard was making physics materials per-shape, but that's more involved.

(The per-GridMap-item override could be implemented either way.)

@akien-mga akien-mga merged commit e911fcd into godotengine:master Apr 11, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@Hyphinett
Copy link

Thanks for the quick work on this, it will make a big impact on my current project.

@rburing rburing deleted the gridmap_has_it_rough branch April 11, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rough physics material not behaving correctly on GridMaps
4 participants