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 ) );
}
}