#Random bumps with rolling ball

1 messages · Page 1 of 1 (latest)

dense juniper
#

Hi All,
I have a player-controlled RigidBody3D ball on a Gridmap. I am experiencing some random bumps when the ball is rolling that slightly bumps the ball into the air and jitters the camera. It only occurs on the edges of the Gridmap tiles. It is strange in that it isn't every tile that has this issue, only a seemingly random few. The tiles are on the same level. I'd like some advice on how to debug or what could be causing this.

next fogBOT
hard laurel
#

show tile

#

that would happen if the collisionboxes don't cover the entire tile

bright goblet
#

Are you using Jolt physics or legacy?

dense juniper
#

I am on Jolt physics. I tried GodotPhysics but had the same result. Decreasing collision margins seems to do nothing. I also tried not using a Gridmap and had 2 tiles apart by their width, and it still had the issue. I can confirm it has to do with the collisions; I made a single large flat plane and there were no bumps. I've attached screenshots of the tile and the gridmap; the sizes match but the issue remains. I'm willing to provide more screenshots if needed; just let me know what I should provide.

carmine idol
rough sleet
#

I had the same issue, just not with a gridmap.
Jolt is way better than the original but sometimes you might need to mess with Jolt's settings a bit.

On my main project I've lowered Speculative Contact Distance from 0.02 to 0.005
And lowered Penetration Slop from 0.02 to 0.01

I've set Continuous CS Movement Threshold from 0.75 to just 0.1
And the max penetration from 0.25 to 0.05

These aren't like, some kind of community recommended values or w/e they are just what I'm currently using.

dense juniper
#

All great suggestions, thank you! And it's good to know a name to the issue: ghost collisions. I used Benight's idea and changed the settings as attached. One key addition was setting the collision margin detection to 0. Despite it saying that setting it closer to 0 would impact collision detection accuracy, it combined with setting penetration slop and speculative contact distance to 0 greatly reduced the bumps, and said bumps are extremely small. It was harder to see the effect of Continuous CD Movement Threshold and Max penetration, but it may help at faster velocities.
I also performed Codimon’s test, and the issue also disappears if the collision shapes are all under the same body. My only concern for this method is the ease of implementation. I know I can remove the collision from the Gridmap and only use it for display only, but my ground is a bunch of floating squares in the air. I don’t know how difficult it would be to make a single concave, maze-like polygon from that and how easy it would be to edit. As such, I'll simply edit the Jolt physics settings and mark this as complete.