0 votes

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

Godot version 3.3
in Engine by (14 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.