13 lines
333 B
GDScript3
Raw Normal View History

2024-02-23 19:13:46 +00:00
class_name BotController
extends Controller
var turn: float
var turn_speed: float = 2.0
2024-02-27 22:21:44 +00:00
func _process(delta: float):
2024-02-23 19:13:46 +00:00
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)