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