Uh, your post is a little confusing... Are you having a problem with the character not shooting in the direction his hand is pointing?
If so, you need to tell your code which way the hand is pointing. Here's how I do it:
var newprefab : GameObject;
newprefab = Instantiate(bulletPrefab, transform.position, transform.rotation);
The instantiated object should now be pointing in the same direction as the object it was spawned in. Then I apply force to the bullet object in a separate script, like so:
rigidbody.AddForce (Vector3.forward * 2000);
(And if that wasn't really the problem you were having, clarify your post a little...)
↧