im trying to spawn a ball when the player collects a powerup in my breakout clone. But the problem i am having is that the gameobject spawns in the same place all the time.
public void SpawnBallClone()
{
Vector3 pos = GameObject.FindWithTag("Paddle").GetComponent<PaddleManager>().PaddlePosition();
print(pos + "from the SpawnBallClone Method");
Instantiate(Ball, pos, Quaternion.identity);
}
the Vector3 pos is the correct value, i am using the print() to make sure the values are correct:
(5.7, -4.1, 0.0)from the SpawnBallClone Method
But when the Ball GameObject is instantiated it always instantiates at 0,0,0.
What am i missing here?