- Home /
Question by
Brugohb · Jan 16, 2018 at 04:49 PM ·
rotationmovetowardsrotating
,MoveTowards stop when add rotation
My object is moving trhough Vector3 pos = Vector3.MoveTowards(transform.position, target[current].position, speed * Time.deltaTime); GetComponent().MovePosition(pos);
But i need it to face the direction of the target he is moving. But when i add any rotate code like this.transform.LookAt(target[current]);
It look at the target but stop moving. Any ideias??,My object is moving through Vector3 pos = Vector3.MoveTowards(transform.position, target[current].position, speed * Time.deltaTime); GetComponent().MovePosition(pos);
but, i need it to face the direction of the target, but when i add this.transform.LookAt(target[current]);
it look at the target but stop moving. Any ideias??
Comment
Your answer
