How to make cylinder rigid body

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By gammaker
:warning: Old Version Published before Godot 3 was released.

I’m trying to implement oil barrels in my 3D game using Godot 2.1.3. I want to make them movable by player, so, I think, they must be rigid bodies. But to my surprise there is no cylinder CollisionShape in Godot.

So I tried to use ConcavePolygonShape that was generated by scene import. Collisions worked fine when it was StaticBody, but when my barrel became RigidBody, it began to pass through walls and other level meshes. Does Godot ignore trimesh-trimesh collisions or I am doing something wrong?

Is there a workaround that solves my problem?

:bust_in_silhouette: Reply From: avencherus

For me it seems that a convex collision shape worked, but the tri-mesh didn’t.

If you want to generate collision shapes quickly in Godot, and you have a mesh already (I’m assume you have a cylinder mesh in your project). While your are in the Spatial view, there is a Mesh tool button. In it reveals the options to Create Convex Collision Sibling

Using the second set, and convex sibling, I can get a colliding cylinder shape rolling down a plane.

It works, thank you!

gammaker | 2017-08-10 16:43

No problem :slight_smile:

avencherus | 2017-08-10 16:44