- Home /
HI, how to smoothly rotate 2d topdown if dist is less than x.code below? Thanks and if someone would want to help i'd like code.thanks a bunch
sorry for the directness, its been too much with this, i want see the code..
if (Vector2.Distance (transform.position, player.transform.position) < shootdist)
{
transform.LookAt (player.transform.position);
transform.Rotate (new Vector3 (0, -90, 0), Space.Self);
}
Comment
Your answer
Follow this Question
Related Questions
follow terrain script works, but Slerp breaks it! 0 Answers
follow camera is jerky for other objects 1 Answer
Add rotation to LookAt (CarSmoothFollow) ? 1 Answer
Smoothly following a moving object 5 Answers
Modified SmoothFollow 0 Answers