![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | dianne watts |
i keep geting the same error massage (invalid operands ‘Vector3’ and ‘Nil’ in operator ‘*’)every time i run the scene
direction = direction.normalized()
h_velocity = h_velocity.linear_interpolate(direction * speed, h_acceleration * delta)
movement.z = h_velocity.z + gravity_vec.z
movement.x = h_velocity.x + gravity_vec.x
movement.y = gravity_vec.y
the erorr is in movement.z
From what I can tell, one of those variables doesn’t have a value (or rather, the value is null
). The problem may be in the assignment to the hvelocity
variable, in the parameters to the linearinterpolate()
function.
Ertain | 2021-08-12 09:14