Godot physics spherical rolling is more like a dodecahedron

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Connor

I am trying to make a physics game where you can roll a sphere around as your character but when you try and go forward for example it is very noticeable that it is hitting the edge of a low-poly sphere imitation instead of calculating physics from a non mesh sphere. Does anyone know how to increase the resolution of godots sphere shape for the collision shape or how to make it calculate physics with a radius instead of a mesh?

edit: so far I have tried messing with some settings

  • Setting Smooth Trimesh Collision in

Project > Project Settings > Physics > 3D
did not help much

  • changing the physics engine to bullet in 3D settings ^
  • and increasing physics fps to 120 in:

Project > Project Settings > Physics > Common

  • and also making the radius of my ball larger
    seems to have mitigated the issue for now. I am not entirely sure if the issue was due to godot physics engine or maybe low detail from physics fps or if the ball size made it have a more detailed collision mesh. If anyone can enlighten me on whether sphere shapes in godot physics are actually meshes (meaning they are jaged) or if this is simply some sort of rounding accuracy error. Before increasing the resolution on just about everything here the ball was skewing pretty damn consistently to the right in steps i t seemed. It is akin to rolling a many sided die with maybe 20 sides or rolling a slightly more round egg. If you play golf with your friends you have seen this before with their special ball shapes :slight_smile:

If I find more info I will update this with any more details i can find.

:bust_in_silhouette: Reply From: kidscancode

Spheres are rolling just fine here. Are you using a SphereShape for your collision?

Yes I am. Inside my RigidBody I have a CollisionShape set to a sphere shape. That link mentions an area can be put in a collision shape, is that at all related?

Connor | 2019-03-24 12:21

No, it mentions SphereShape can be used for a body or for an area.

Check your CollisionShape’s Transform - maybe you’ve stretched it a bit. Make sure the “Scale” property is (1,1,1).

Also perhaps the problem is in the surface you’re rolling on, not the sphere itself.

kidscancode | 2019-03-24 16:45