This question was
closed Jan 19, 2016 at 07:43 AM by
Yetter for the following reason:
Fount the Answer
Lerp Rotation
I'm firing a projectile towards a selected enemy. Its turnbased, I always know exactly where the target will be and have been using the lerp function as the travel method for the projectile under the update method
Vector3 direction = Vector3.Lerp(transform.position,target.position,step);
transform.position = direction;
I can't figure out how to set the rotation properly, the project tile is a laser and it always flies directly towards the target but parallel to the side of the screen. Any help at all would be greatly appreciated :)
EDIT quick clarification. Its essentially in first person and the laser should be flying away from the player/screen
Comment