-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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
Removing and re-adding child CSG shape stops collision mechanics #58050
Comments
If you enable Debug > Visible Collision Shapes and run the project, can you still see the generated trimesh collision for the CSG shape after it was readded to the scene tree? As a workaround, you can likely modify the CSG shape's geometry slightly after readding it to the scene tree. This will cause it to regenerate its collision. |
Thanks Calinou,
I do not see a detected collision whether that option is true or false ,upon readding the shape to the tree. In both cases the geometry is not rendered when removed from the tree.
Thanks for suggestion, this appears to not work either however: After readding, I tried to increase the radial segment and ring count of the CSG sphere and although the assignment works, the rendered shape is not drawn as expected. It appears to have the same parameters as when first initialised. My current workaround is to just reinitialise it and that does work. |
Fixed by #58938. |
Godot version
v3.4.stable.official [206ba70]
System information
Ubuntu 20.04.3 LTS
Issue description
Hi there, when I remove a 3D collision CSG shape from a scene and add it again,
intersect_ray
no longer returns hits but the shape renders normally. I'm not sure if this is a bug but my expectation is that the collision mechanics should still be active upon re-adding the shape to the scene. The shape flaguse_collision
is unchanged after removal and re-addition to the scene tree apparently. I tried understanding what might be happening from theadd_child
andremove_child
source code but nothing stands out to me.I attach a minimal test project that tests both in-script and editor instanced collision shape in case that matters.
Steps to reproduce
Run the minimal reproduction project attached. Double click to remove and add the collision shape. See the console output, after re-adding the collision shape, no hits are triggered when mouse is hovered over object.
Minimal reproduction project
ColliderTest.zip
The text was updated successfully, but these errors were encountered: