hi, how to make topdown 2d lerp rotation on turret,. i.e. turret smoothly rotates on target.cheesy setup below:
current cheesy setup : void Update () {
float dist = Vector2.Distance (gameObject.transform.position, target.transform.position);
if (dist < 12) {
transform.LookAt (target.transform.position);
transform.Rotate (new Vector3 (0, -90, 0), Space.Self);
}
}
Comment
Your answer
Follow this Question
Related Questions
keep player centred in grid based movement 0 Answers
Keep "ball" character's face rotating to be up? 0 Answers
How to smoothly rotate gameobject 20 degrees on key press? 0 Answers
fromtorotation inacurate Help fixing? 0 Answers
Lerp Rotation 0 Answers