public Rigidbody2D Projectile;
Rigidbody2D ProjectileCLone;
GameObject ProjectileCopy = Instantiate(Projectile, new Vector3(transform.position.x + xi, transform.position.y + yi, transform.position.z), Quaternion.identity) as GameObject;
ProjectileCopy.GetComponent<Rigidbody2D>().AddForce(ProjectileCopy.transform.up * 50);
that is actually spawning as much “ProjectileCopy” on click at the right location as i want - but the “AddForce” Part is not working.
I want the instantiated Projectile get shot from that correctly defined spawn position with Force (or maybe velocity)
Does anyone have a correct code for that ? I tried a lot of solutions already.