-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Importing .glb with parent as RigidBody, cannot import a child CollisionShape3D #79086
Comments
@aaronfranke We've talked at length about this issue. Do we have a summary of the discussion. |
This will be easy to support after #77937 is merged. |
I personally don't think that this is the right approach for Godot's tree based scenes. The collision shape node should always remain a child of the corresponding body. |
Hi guys, what does #77937 do that would solve this problem @aaronfranke, and why is it not the right approach @capnm? |
#77937 would allow us to generate the collision shape node anywhere in the node hierarchy, and the shape will search upwards arbitrarily far for a body (static, rigid, etc). Then we would change the importer to import only the shape instead of a bunch of static bodies, which would cause the shapes to apply to the rigid body. |
It does seem to partly solve my problem, but I'm not clear on how it allows us to define specific What I haveIf I have this blender scene, with a lowpoly collider and a higher poly mesh Like I said in the original post, I can change the root node in import settings, but the What I wantThat seems like an important primitive, so maybe I'm just missing how to do this with import hints. What currently kind of worksAnd turn off the visibility of the additional It's not ideal that the SolutionsI would suggest either of the following:
I prefer Solution 1. Seems cleaner. |
@wjagodfrey For "Add new import hints", note that special node names are kind of a hacky solution, and they are not very flexible (for example, it only works with mesh-based shapes, no way to specify a box collider for your crate). Long-term, the solution is to make Blender export explicit physics information like OMI_physics_shape. |
@aaronfranke it is hacky, but it's the solution we've got. It's incomplete, and it would be great to plug the gap. |
@wjagodfrey The situation seems to be improving :) this could plug the gap. |
Godot version
4.0.3
System information
MacOS 12.3
Issue description
The Godot 3D import features are impressive and easy to use, but I think I've found an edgecase.
When a user wants to import a 3D model and have the resulting node be a
Body3D
, they can change this in the import settings asRoot Type
. HoweverBody3Ds
expect collider shapes to be direct children.The only way I can see to create a collider shape on import is to use the
-col
,-convcol
,colonly
and-convcolonly
object prefixes defined here.The problem is that these all create a
Body3D
parent node with the collision shape as a child. This is the correct behaviour in any case other than the intendedBody3D
being the object root node.E.g.:
In blender:
In import settings:
Import preview tree:
The
ChocolateBarCollider
collision shape is put inside aStaticBody3D
, when I need it to be placed directly under the parent node.My work around has been to use the
New Inherited Scene
option and add aBoxCollider3D
manually, which works fine in this instance but may not be so straightforward with more complex meshes that are updated frequently.It would be great to know if I've just missed something
Steps to reproduce
-convcolonly
prefix.glb
Root Type
import setting to aRigidBody3D
StaticBody3D
with a large box colliderThe object will fall through the
StaticBody3D
colliderMinimal reproduction project
Repro repo here
The text was updated successfully, but these errors were encountered: