Hi again I’m still having problems trying to solve this and have been unable to describe my problem in a way that anyone could help me so i drew a diagram that might help you help me ![]()

(i) Main Character
(ii) Rocket Weapon attatched to main character with a spawnPoint object infront of the barrel to spawn the rockets, They are on a lookat script to always have the rotation oriented towards the crosshair
(iii)Crosshair is attatched to the mouse orbit camera that controls the characters rotation and the crosshairs vertical position.
(iv)Rocket is produced at spawnPoint on Fire1 press, I have managed to get it going in the correct rotation as if it was to do the desired path but it isnt going on the correct line.
(v)The desired path for the rocket to take, starting at spawnPoint and moving along the line from spawnPoint towards crosshair to pass through it correctly.
(vi)The current path that the rockets take. Always staying at a steady forward rate as I don’t know how to enter the correct path.
My current code for the rocket is;
var rocketPrefab:Transform;
function Update ()
{
if(Input.GetButtonDown("Fire1"))
{
var rocket = Instantiate(rocketPrefab,
GameObject.Find("spawnPoint").transform.position,
GameObject.Find("spawnPoint").transform.rotation);
rocket.rigidbody.AddForce(transform.forward *2000);
}
}
Where I need transform.forward to be replaced by the path from spawnPoint to crosshair somehow. Am I going about this completely the wrong way?
I hope I have explained this better this time as this problem is really holding back my development as I want my basic functionality and knowhow working before I start on the more complicated ideas.
Any help or contributions appreciated
Thank you for taking your time to read this ![]()
Sir MaXx