- Home /
Question by
DaedalusFlyBoy · Sep 24, 2019 at 10:47 AM ·
c#rotationcharacternpc
how to make NPCs face my player? I'm a beginner
hey guys,
So I'm making a little open world 3d game, and my character accepts quests off NPCs and I've got all that working great.
However, I want to add a system where the NPC's always rotate to face my character, is there a simple way of doing this?
any help is appreciated :)
Comment
Answer by visca_c · Sep 24, 2019 at 01:42 PM
Transform.LookAt might be what you need.
https://docs.unity3d.com/ScriptReference/Transform.LookAt.html