Question by
pelletiert22 · Sep 06, 2021 at 02:51 PM ·
rotationaifollow player
2D AI enemy following and rotation error
Ok so I am making a 2d game and I have want my enemy to be looking at the player when he follows but i am not sure how to do it so tryed a lot of things and it asn't worked could someone help me.
transform.position = Vector2.MoveTowards(transform.position, player.position, transform.rotation, player.rotation, speed * Time.deltaTime);
I just want it to immiate the player rotation.
Comment