0 votes

Hi i try to build RigidBody from a generated CSG model and run into multiple problems.

The RigidBody is create by adding the collision shape build form the CSG node.
I try to use createconvexshape() and createtrimeshshape() with different results.

  • createtrimeshshape() collision NOT works between RigidBody but with the floor mesh, no stucks
    create_trimesh_shape
  • createconvexshape() collision works between RigidBody but stucks when the RigidBody collidates
    create_convex_shape

I had also problems with the collision shape scale (documented in the source)

You can downlad the example projekt and press 'g' to generate the models and navigate by w,a,s,d
testCsgGenCollision.rar

in Engine by (44 points)

1 Answer

0 votes

What was your step by step procedure to get the meshes?

I think you don't need to make a mesh out of the CSG. Just create a RIGID BODY, create the CSGs as childs of the rigid body, and COLLISION SHAPES as childs of the rigid body too.

enter image description here

enter image description here

by (120 points)

Hi thanks for your anwser.

The example was just a simple CSG model and apply multiple basic collision shapes is not a option for me.
The CSG models are procedual generated and can have a complex shape.
I need to extract the final result out of a CSG operation to build the exact collision shape.

It looks like it is a gereral bug in Godot, i tested with a imported meshes and generate a trimesh shape as collision shape from it.
All Ridigbodys with a trimesh shape not interact with it self, but build a concex shape it works.
Use a convex shape is not exact enough, and i found some differences between the implemented Physics engine (GodotPhysics, BullettPhysics).

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.

Categories