Hi, so I'm trying to make a RPG launcher to shoot the projectile. I've attached a Rigidbody to projectile. The projectile is a child of the Main RPG prefab. I need it to move forward on its local axis (Way where the camera is directed) but it moves forward in the World Space. So I need to know how to move it through Local Axis. Here's the code, Thanks.
World Space axis to Local Space
Code (JavaScript):
- #pragma strict
- var projectile : Rigidbody;
- var speed : int = 500;
- function Update ()
- {
- if(Input.GetButton("Fire1"))...