My Codes Works about making Instantiate prefab ball and shooting ball with swipe but Its just works for first ball
I froze the ball in Y axis when game start and its opens the freeze
myBody.constraints=RigidbodyConstraints2D.None;
``GetComponent().AddForce(-direction/timeInterval*throwForce); Sendball();
First Ball going well but after that other Clone is starts with unfreeze at Y axis (because of Same Script) and drops down.
I want to shut off the ball control after swipe and clone new ball with Freeze at Y axis . Im also making some changes to make my game like 3d its going smaller after swipe etc.
How can i make Instatiate new object with reset other changes and starts like a first ball. And stop control ball after throw it ?
private void SendBall(){
GameObject newProjectile=Instantiate(projectile) as GameObject ;
newProjectile.tag=("BallProjectile");
newProjectile.transform.parent=projectileParrent.transform;
newProjectile.transform.position=spawn.transform.position; }
↧