All I want to do is fire a projectile in the direction I am looking. I am using the FPS-Controller and my projectile is just a basic sphere.
I know I probably messed something basic up, but this is what I have:
void Update () {
if (Input.GetMouseButtonDown(1))
{
Vector3 transformation = character.transform.forward;
GameObject g = Instantiate(basicShot,character.transform.position+ trans * 5, character.transform.rotation) as GameObject;
g.GetComponent<Rigidbody>().AddForce(trans * 100);
g.GetComponent<Rigidbody>().useGravity = false;
}
character is the Rigidbody from the FPS Controller
Currently the projectile fires in the correct detection on the x-z plane, but does not have any y velocity (neg or pos) no matter how i rotate the camera