Car tutorial from KidCanCode - My sphere doesn't move with physic :/

Godot Version

4.2.1

Question

Hi there !

I’ve follow this tutorial from KidCanCode :

It is to make a driving car :slight_smile:

https://kidscancode.org/godot_recipes/4.x/3d/3d_sphere_car/index.html

I have write the exact same code and I have the exact same setup between my scene and an imported scene from the tutorial.

But for some reason, my sphere doesn’t move when I press the keys…

Here is the code :

Here is the project ZIP

Because your car is a sphere with a solid texture you can’t see it spin around. When it does, the raycast you use to test for ground spins with it because it is a child in the node tree. This makes it point away and thus disable the controls.

To fix this you can just lock the rotation of the sphere so it slides, but doesn’t spin.