godotengine / godotengine/godot

VehicleWheel3D: rotation does not match actual movement

Open
#109,062 9 comments 0 reactions 0 assignees View on GitHub
discussion documentation topic:3d topic:physics
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Godot: v4.4.1.stable.steam [49a5bc7b6]

### System information

Windows 11, Forward+

### Issue description

VehicleWheel3D, while capable to tract the vehicle in any direction (where it is pointing), rotates only along the Z axis. For example, if the wheels are pointing into +X direction, they are not rotating, unless the vehicles starts to shift along the Z axis. This also relates to `get_rpm` method of the wheel.

### Steps to reproduce

1) Create a simple vehicle using VehicleBody3D and 4 VehicleWheel3D's, but where the front of the car is at +X, for example. And wheels pointing the same way.
2) Add non-circular meshes (like boxes) to wheels to better see the rotation.
3) Drive the car. While moving forward, wheels are not rotating. Nor visually, nor logically (get_rpm is virtually zero).
4) Steer the car, so that the car (and the wheels themselvs) get some velocity along the Z axis relative to the car itself.
5) You see that wheels starts to rotate according to their Z-compound of the velocity.

### Minimal reproduction project (MRP)

[car-wheels.zip](https://github.com/user-attachments/files/21477003/car-wheels.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the VehicleWheel3D behavior described in the issue and reproduce it using the linked car-wheels.zip project, focusing on wheel rotation and get_rpm when the vehicle faces +X. Compare forward movement with movement along Z and verify that both the visible rotation and reported RPM follow the wheel's actual travel direction.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, godot
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.