starting work on the HIVEMIND
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
extends Node3D
|
||||
|
||||
var minions = []
|
||||
var minion_nav_point = []
|
||||
var number_minions : int
|
||||
var rot_amount : float
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
@@ -10,4 +13,10 @@ func _ready():
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
for i in minions:
|
||||
number_minions = minions.size()
|
||||
rot_amount = 360 / number_minions
|
||||
i.nav_agent.set_target_position(i.player.global_transform.origin)
|
||||
var next_nav_point = i.nav_agent.get_next_path_position()
|
||||
|
||||
i.hive_velocity = (next_nav_point - i.global_transform.origin).normalized() * i.SPEED
|
||||
|
||||
Reference in New Issue
Block a user