-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vehicle Wheel doesnt spin on air #37018
Comments
Can anyone still reproduce this bug in Godot 3.2.3 or any later release? If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop. |
It is still the case in 3.3.2 stable Even though it looks like a bug, it also looks like it's an intended behaviour. |
Yes, this is rather unfortunate. Maybe it would not be hard to add? I don't know, I am new to Godot. The code here is just a concept for logic. If the sign of the direction does not match the sign of the engine force, then the wheels should move in the opposite direction: if sign(_vehicle_direction) !== sign(engine_force):
wheel_spin_dir = -wheel_spin_dir There should also be a way to override the wheel spin, so users can do something like: if _vehicle_moving and !is_in_contact():
# something to manually spin the wheels here |
This is intended from the docs But don't know why they chose it to be. Wheels should spin in the air too, like ramping up. |
@ash-hashtag: The VehicleBody and VehicleWheel are ports of Bullet's functionality. I am not sure whether the original authors intended this or not... |
Please upload a minimal reproduction project to make this easier to troubleshoot. |
I can confirm the same issue appears in Godot 4. A minimal reproduction project The same thing happens when the wheel is skidding, but I guess that should be a different bug report? |
I'm highly sure this is because the RPM is more a value that returns the contact RPM. When the wheels aren't in contact with anything they aren't pushing the car forward therefore meaning the RPM is 0. The wheel rotation probably uses the RPM value to spin the wheels so that's why they don't spin while in the air or spin faster when the wheels are spinning out. You may need to spin the wheels manually if they're not in contact with the ground. |
Windows 10
Ryzen 5 2600, Nvidia GTX 1060
Godot 3.2
If applying an engineforce to the wheel, they only spin when in contact with something.
I applied a engine force to a single wheel and also to the vehicle body and while on the air the wheel mesh doesnt appear to be spinning and wheel.get_rpm() returns 0
Also when on the ground and skidding(i set friction slip to 0.1) the wheel doesnt keep rotating if you accelerate, it matches the speed of the road, for example, if the car is rolling backwards and you accelerate forwards the wheels keep rotating backwards
The text was updated successfully, but these errors were encountered: