I have the following red projectiles heading towards a spacecraft that rotates around a planet:
I’m having difficulty rotating the projectile so either thin end faces towards the spaceship. In LookAt I’ve tried giving it various axis to define the up rotation, I’ve also tried rotating the prefab a bunch, however, they always face the ship like that.
Any help is appreciated =)
Your prefab is not correctly oriented. Here, your capsule is along the Y-axis (green), but it should be on the Z-axis (blue).
Since we don’t know how your prefab is built, it will be ahrd to advise you anything to fix the prefab (best solution). Maybe, you could make the capsule a child of an empty gameObject which will be your new prefab. Then, rotate the capsule so that its main axis is oriented on the Z-axis of the empty.
Otherwise, you will have to play with rotation angles in your code: