13 lines
326 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
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)