if(Input && ContadorTiro == 0)
{
var Rotation = (GetGlobalMousePosition()- GlobalPosition).Angle();
Bullet.Rotation = Rotation;
Bullet.Position = Position;
GetParent().AddChild(Bullet);
ContadorTiro = TempoDeSaida;
}
else if(ContadorTiro > 0)
{
ContadorTiro -= 1;
}
*Bullet is an instantiation of the scene
My problem is that when I use Position and GlobalPosition in a scene where I instantiate the Player, two Vector2 values are returned. Carrying the projectile shoots from the two positions