Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit) (+1)

I really enjoyed this game. There’s nothing more satisfying than landing a perfect flip. 😌

Incidentally, I’ve also been working on a side project with Kenney’s Toy Car Kit and have encountered similar problems with Godot’s built-in physics engine. In my project the vehicle appears to either bump over, or stop abruptly when encountering a seam in the collision boxes between two pieces of road.

The problem appears to arise when using 3D meshes for the car & track. The reason I suspect this is because when I make the car & tracks out of primitives, namely CSGBox & CSGCylinder, then the driving physics work as expected.

I have yet to get to the bottom of this, but here are some workarounds & observations I found along the way:

  • Using RigidBody3D for the wheels instead of VehicleWheel3D will cause the vehicle to no longer stop in place abruptly when reaching a seam. It still bumps but it’s less egregious.
  • Create the track out of groups of meshes with no collision shapes. Then create a single instance of StaticBody3D with a matching collider. This may be a bit laborious to setup but works a bit better than having lots of individual colliders since now you have less seams to bump into. This can be a suitable approach for a game with a few hand-crafted tracks.
  • Creating the tracks using a Path3D works as it produces a single complex collision shape. However, this approach would have been incompatible with the Jam’s rules since you have to use a CSGPolygon in conjunction with the Path3D as it does not support arbitrary meshes.
  • I also tried using a GridMap to compose my tracks. This did not yield any result.
  • Also, switching to the Jolt physics engine did not help either. It was just a “different kind of wrong”

PS. I tried the exact same setup in Unity & Unreal Engine and it just works out of the box. Oh well … 🤷‍♂️

Hope this helps

(+1)

Glad to see someone else go down the same rabbit hole! The implementation is the car being a rigidbody , with several static bodies. I did try and combine the colliders into one mesh under a single staticbody but it didn't seem to help which was confusing. As you said jolt didnt help at all, I made a simple project with the issue and using the rapier physics addon fixed it in the simple project but not in my game. I did fix the issue using a characterbody3d and move_and_slide. This broke other things though like loops so wasn't worth it in the end.