So I'm working on my rocket launcher in my 3rd person shooter. I'm trying to get it so the rocket launcher fires the rocket and it flies at my target gameobject (which is a GameObject that is constantly moving, to a position based off a raycast from the center of my 3rd person camera).
Here's how I currently have my rocket launcher script:
My problem is, the initialSpeed variable doesn't actually effect the speed of the rocket at all. As far as I can tell, it doesn't do anything. If I take away the .normalized on the direction variable, the behavior of the rocket is really strange: It will fly slower or faster depending on how far away the target is (so if i'm aiming at a far away wall the rocket will go impossibly fast, but if I aim at the ground in front of me it goes as slow as molasses).
What am I doing wrong? How could I get my rocket to travel to my target GameObject at a set speed that I have control over?