Can somebody tell my what's wrong with this?
func Get_Target():
var target: Vector3 = ai_path.get_child(ai_current_pos).position
return target
It says: Invalid get index 'position' (on base: 'Position3D').
I don't know why it returns null, the variable aipath is a reference to the path root node ("../AIPath") and the getchild should get the first child since the variable aicurrent_pos is set to 0;
Node Tree:
(Root) World
- ...
- AI_Path
- Node1
- Node2