After reading you suggestion I decided to change the position of the fire position Game Objects(Because I thought that they should also move a little with the movement of the ship) in a very barbaric way…=)
private void MovementAnimations()
{
if (Input.GetKeyDown(KeyCode.D))
{
animatorPlayerShip.SetFloat(“Pan”, 0.6f);
animatorPropultion.SetFloat("ProRight", 0.6f);
animatorGölge.SetFloat("ShadowPan", 0.6f);
if (pUpMan.mGunOne == true)
{
f1.transform.position = new Vector2(f1.transform.position.x, f1.transform.position.y);
}
if (pUpMan.mGunTwo == true)
{
f3.transform.position = new Vector2(f3.transform.position.x - 0.144f, f3.transform.position.y + 0.05f);
f2.transform.position = new Vector2(f2.transform.position.x + 0.150f, f2.transform.position.y - 0.244f);
}
if (pUpMan.mGunThree == true)
{
f1.transform.position = new Vector2(f1.transform.position.x, f1.transform.position.y);
f3.transform.position = new Vector2(f3.transform.position.x + 0.14f, f3.transform.position.y + 0.15f);
f2.transform.position = new Vector2(f2.transform.position.x - 0.15f, f2.transform.position.y - 0.05f);
}
}
else if (Input.GetKeyUp(KeyCode.D))
{
animatorPlayerShip.SetFloat("Pan", 0.4f);
animatorPropultion.SetFloat("ProRight", 0.4f);
animatorGölge.SetFloat("ShadowPan", 0.4f);
if (pUpMan.mGunOne == true)
{
f1.transform.position = new Vector2(f1.transform.position.x, f1.transform.position.y);
}
if (pUpMan.mGunTwo == true)
{
f3.transform.position = new Vector2(f3.transform.position.x + 0.244f, f3.transform.position.y - 0.15f);
f2.transform.position = new Vector2(f2.transform.position.x - 0.50f, f2.transform.position.y + 0.244f);
}
if (pUpMan.mGunThree == true)
{
f1.transform.position = new Vector2(f1.transform.position.x, f1.transform.position.y);
f3.transform.position = new Vector2(f3.transform.position.x - 0.14f, f3.transform.position.y - 0.15f);
f2.transform.position = new Vector2(f2.transform.position.x + 0.15f, f2.transform.position.y + 0.05f);
}
}
if (Input.GetKeyDown(KeyCode.A))
{
animatorPlayerShip.SetFloat("Tilt", 0.6f);
animatorPropultion.SetFloat("ProLeft", 0.6f);
animatorGölge.SetFloat("ShadowTilt", 0.6f);
if (pUpMan.mGunOne == true)
{
f1.transform.position = new Vector2(f1.transform.position.x , f1.transform.position.y);
}
if (pUpMan.mGunTwo == true)
{
f3.transform.position = new Vector2(f3.transform.position.x + 0.144f, f3.transform.position.y - 0.05f);
f2.transform.position = new Vector2(f2.transform.position.x - 0.150f, f2.transform.position.y + 0.244f);
}
if (pUpMan.mGunThree == true)
{
f1.transform.position = new Vector2(f1.transform.position.x , f1.transform.position.y);
f3.transform.position = new Vector2(f3.transform.position.x + 0.144f, f3.transform.position.y - 0.05f);
f2.transform.position = new Vector2(f2.transform.position.x - 0.150f, f2.transform.position.y + 0.244f);
}
}
else if (Input.GetKeyUp(KeyCode.A))
{
animatorPlayerShip.SetFloat("Tilt", 0.4f);
animatorPropultion.SetFloat("ProLeft", 0.4f);
animatorGölge.SetFloat("ShadowTilt", 0.4f);
if (pUpMan.mGunOne == true)
{
f1.transform.position = new Vector2(f1.transform.position.x , f1.transform.position.y);
}
if (pUpMan.mGunTwo == true)
{
f3.transform.position = new Vector2(f3.transform.position.x - 0.144f, f3.transform.position.y + 0.05f);
f2.transform.position = new Vector2(f2.transform.position.x + 0.150f, f2.transform.position.y - 0.244f);
}
if (pUpMan.mGunThree == true)
{
f1.transform.position = new Vector2(f1.transform.position.x , f1.transform.position.y);
f3.transform.position = new Vector2(f3.transform.position.x - 0.144f, f3.transform.position.y + 0.05f);
f2.transform.position = new Vector2(f2.transform.position.x + 0.150f, f2.transform.position.y - 0.244f);
}
And this is how it looks now.