Improved movement interpolation

This commit is contained in:
2024-02-23 20:13:46 +01:00
parent 7926b7a80e
commit fcee55d9a4
10 changed files with 48 additions and 31 deletions

View File

@ -0,0 +1,13 @@
class_name BotController
extends Controller
var turn: float
var turn_speed: float = 2.0
func _process(delta):
if (Time.get_ticks_msec() / 1000) % 2 == 0:
direction_changed.emit(Vector3.ZERO)
else:
turn += turn_speed * delta
var direction := Vector3.RIGHT.rotated(Vector3.UP, turn)
direction_changed.emit(direction)