Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | infinity10004 |
i was trying to make a vehicle racing game following along this tutorial
Godot Vehicle Tutorial (VehicleBody): (Armored) Car
after a while, while i was testing the vehicle i saw that the wheels were vibrating and no matter what i do they keep vibrating slightly up and down
here is the code i used
extends VehicleBody
var horse_power = 200
var accel_speed = 20
var steer_angle = deg2rad(30)
var steer_speed = 3
var brake_power = 40
var brake_speed = 40
func _physics_process(delta):
var throt_input = -Input.get_action_strength("s") + Input.get_action_strength("w")
engine_force = lerp(engine_force,throt_input*horse_power,accel_speed * delta)
var steer_input = -Input.get_action_strength("d") + Input.get_action_strength("a")
steering = lerp_angle(steering,steer_input*steer_angle,steer_speed*delta)
var brake_input = Input.get_action_strength("space")
brake = lerp(brake,brake_input*brake_power,brake_speed*delta)
i also tried adjusting the center of gravity the weight the radius of the wheels etc.
still i can,t fix it
My question is is this vibration of wheels a problem o f the editor itself or did did i miss any parameter in the vehicle wheel