I am following a tutorial and am brand new to the engine, coding, and game designing in general. Regardless, I do not understand why this error is popping up for me as no one else has commented a problem like mine. Something has to have changed as my code looks exactly as the tutorials.
export var gravity = -20.0
export var wheel_base = 0.6
export var steering_limit = 10.0
export var engine_power = 6.0
export var braking = -9.0
export var friction = -2.0
export var drag = -2.0
export var max_speed_reverse = 3.0
var acceleration = Vector3.ZERO
var velocity = Vector3.ZERO
var steer_angle = 0.0
apply_friction(delta) #This is the problem child.
acceleration.y = gravity
velocity += acceleration * delta
velocity = move_and_slide_with_snap(velocity, -transform.basis.y, Vector3.UP, true)
if velocity.length() < 0.2 and acceleration.length() == 0:
velocity.x = 0
velocity.z = 0
var friction_force = velocity * friction * delta
var drag_froce = velocity * velocity.length() * delta
acceleration += drag_force + friction_force #This is giving me problems as well.
I have no idea why its being changed. But it looks like this. "apply_friction(delta)"