I can't rotate the node, because the sprite will be rotated too, i can't do that.
Actually, i have this:
var round = [Vector2(-1, 0), Vector2(-2, 1), Vector2(-3, 2), Vector2(-3, 3), Vector2(-2, 4),
Vector2(-1, 5), Vector2(0, 5), Vector2(1, 4), Vector2(2, 3), Vector2(2, 2), Vector2(1, 1)]
var path = [ ]
var firstRound = true
var velocityFactor = 50
if firstRound:
for point in round:
path.append(flyTarget + Map.map_to_world(point))
unitPath.append_array(path)
unitPath.append(flyTarget)
firstRound = false
velocity = position.direction_to(unitPath[step]) * velocityFactor
moveScript.configFrame()
else:
step = step - path.size() - 1
velocity = position.direction_to(unitPath[step]) * velocityFactor
moveScript.configFrame()
In practice, i have this below (yellow arrow show the direction i want the plane must take):
I need something more smoothly. This is too "raw", "square".
