2024-02-27 23:21:44 +01:00

13 lines
333 B
GDScript

class_name BotController
extends Controller
var turn: float
var turn_speed: float = 2.0
func _process(delta: float):
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)