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

Godot doesn't support mesh collisions for RigidBody and VehicleBody #4159

Open
slapin opened this issue Mar 27, 2016 · 9 comments
Open

Godot doesn't support mesh collisions for RigidBody and VehicleBody #4159

slapin opened this issue Mar 27, 2016 · 9 comments

Comments

@slapin
Copy link
Contributor

slapin commented Mar 27, 2016

Operating system or device:
Any

Issue description (what happened, and what was expected):
In Unity you can use any convex shape for RigidBody (one can be generated from mesh).
This feature is strangely unimplemented yet.

Steps to reproduce:
Well, just adding convex mesh collision to RigidBody and trying to collide should do.

@karolgotowala
Copy link

Tip: godot physics can't collide trimesh vs trimesh colliders, other combinations are okay.

@slapin
Copy link
Contributor Author

slapin commented Mar 28, 2016

Tip: godot physics can't collide trimesh vs trimesh colliders, other
combinations are okay.
This is not true and unrelated.

Try setting-up Box as StaticBody (make large ground object) and ConvexShape
as RigidBody.

Only combination which works is Convex/Concave shape as StaticBody and Box
as RigidBody.

Anyway, colliding of trimesh objects works in Unity, so should work in
Godot too.

On Sun, Mar 27, 2016 at 11:16 PM, karolgotowala [email protected]
wrote:

Tip: godot physics can't collide trimesh vs trimesh colliders, other
combinations are okay.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#4159 (comment)

@karolgotowala
Copy link

It works doing like you said. Other combinations works too.

for you♥
Devs said thta in godot 3.0, 3D part of engine will be rewritten so for now you have to take it as it is.
Greets.

@reduz
Copy link
Member

reduz commented Aug 4, 2017

this is not a bug, it's simply that a convex decomposition was never added for 3D.. waiting to see what happens with the 3D physics engine in the next weeks

@reduz reduz added enhancement and removed bug labels Aug 4, 2017
@reduz
Copy link
Member

reduz commented Aug 7, 2017

kicking to 3.1 for now

@reduz reduz modified the milestones: 3.1, 3.0 Aug 7, 2017
@akien-mga akien-mga modified the milestones: 3.1, 3.2 Jan 9, 2019
@akien-mga
Copy link
Member

this is not a bug, it's simply that a convex decomposition was never added for 3D.. waiting to see what happens with the 3D physics engine in the next weeks

What's the status of this issue now that convex decomposition was implemented with v-hacd?

@akien-mga akien-mga modified the milestones: 3.2, 4.0 Nov 11, 2019
@MikeSchulze
Copy link

nice to see you added milestones to support trimesh collision support, hopefully rigidbody with trimesh collision too

@akien-mga
Copy link
Member

It would be useful to have a minimal reproduction project that can showcase what is expected to work and is not currently working (provided that this issue is still valid, otherwise it should be closed).

@Calinou
Copy link
Member

Calinou commented Feb 10, 2022

We should improve warning reporting so that users know why their collisions aren't working. Quoting my comment from #30442:

I believe this is expected, as RigidBodies can't use trimesh collision shapes. See this warning for RigidBodies in Kinematic mode: [...]

In the MRP, there's a node configuration warning appearing:

image

Running the MRP won't print a warning message though, as the RigidBody isn't using Kinematic mode. We could print a warning message at run-time to complement this node configuration warning, but this may have a non-negligible performance cost. If checking turns out to be expensive, the check could be enabled in debug builds only.

As for implementing the feature itself, I'm not sure what would be the best way to do it. We could automatically generate simplified convex shapes if the user attempts to use trimesh collision in a RigidBody, but this could result in inaccurate collisions for particularly complex objects. That said, for most small or medium-sized objects, it should work well enough 🙂

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

No branches or pull requests

7 participants