+1 vote

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 :)

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

in Engine by (43 points)
edited by

1 Answer

0 votes

Spheres are rolling just fine here. Are you using a SphereShape for your collision?
https://docs.godotengine.org/en/latest/classes/class_sphereshape.html

by (22,067 points)

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?

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.

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 Frequently asked questions and 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 [email protected] with your username.