I need help about Basic Basketball Game
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; }
Your answer
Follow this Question
Related Questions
Random.range game object destroying itself before reaching destroy position.Please help. 1 Answer
How to destroy on exiting PlayMode/EditMode? 1 Answer
NullReferenceException when attempting to call a GameObject from within PointerEventData 1 Answer
Is it safe to instantiate a GameObject and then change it's components? 1 Answer