Question by 
               ammaralasaad12 · Apr 25, 2020 at 01:55 PM · 
                rotationgameobjectvector3addforcesphere  
              
 
              Rotat a GameObject and than shoot it in the New (x) direction
hello my Name is Ammar i am new with C# that is why i have a problem with this code because i want to rotate the Game object and after that shoot it in the new (x) direction. please Help me and thank you void Start() { { rb = this.GetComponent(); } }
     void Update()
     {
 
         transform.Rotate(0, ballrotaion * Time.deltaTime, 0);
 
         if (Input.GetKeyDown(KeyCode.Mouse1))
         {
             
            rb.AddForce( new Vector3(speed,0,0 ) );
} }
               Comment
              
 
               
              Answer by ammaralasaad12 · Apr 25, 2020 at 01:57 PM
BTW the GameObjct is a Sphere for a Pool Game Thank you
Your answer
 
 
             Follow this Question
Related Questions
Make RawImage on canvas look at gameObject 0 Answers
How to properly set rotation constraints in the positive and negative direction? 0 Answers
How to move an Instantiated Object towards a moving Object? 0 Answers
GameObject falls instead flying horizontally at max height 1 Answer
Operator '==' is ambiguous on operands of type 'Vector2' and 'Vector3' 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                