So, I’ve got this problem on my game:
I have a rolling ball, and I want it to fire a balls as a bullets.
GameObject Bullet = (GameObject)Instantiate(bullet,transform.position,transform.rotation);
Bullet.rigidbody.AddForce(rc.transform.TransformDirection(Vector3.forward) * 10);
I want to add force on bullet in the direction of rc object, when I hit play , everything goes right until the vector returned from TransformDirection function contain a negative values(x,z), then the direction of the bullets stuck at last positive values for this vector.
Sorry for bad English.