So basically I’ve got two objects box1 and box2
I’ve made box1 to move to the box2 (without accelerating or anything like that. just move and stop) but the problem is if I will turn box1 180, it will act weird, it will move around the map in circles until it reaches the box2 just like something goes in to the black hole… Here is the code:
var target : Transform;
var speed : float = 1;
function Update() {
transform.Translate((target.transform.position - transform.position).normalized * speed *Time.deltaTime);
}
So basically I want box1 to move straight to the box2 without making curves and stuff
Also would be awesome if it will face to the box2, no matter how I will turn it.
HELP PLEAAASAEEE!!!