What im trying to do is make a fps and make a raycast be the bullet. The problem is when i use addforceatposition it says the point isnt part of unity.transform? Look!
function update()
{
if(Input.GetMouseButton(0))
{
var forward = transform.TransformDirection(Vector3.forward);
var hitInfo : RaycastHit;
if (Physics.Raycast (transform.position, forward, hitInfo, 1000))
{hitInfo.rigidbody.AddForceAtPosition (hitInfo.transform.point,forward * 50);
}
}
}
Can anyone help me with this? Thanks!