Hi Tony
I have a Dialogue System trigger on my NPC.
How do I make so if my player comes from behind that the NPC faces the player direction?
Also I am using a camera which is close up. Will I need to move this as well?
NPC Face player
Re: NPC Face player
Hi,
For a 3D game, use the LookAt() sequencer command. This rotates the subject to face the target. If you don't provide any parameters, it rotates the actor and conversant to face each other.
For a 2D game, you'll have to write your own sequencer command or handle it in a Dialogue System Events component set to OnConversationStart or use an OnConversationStart(Transform) method on the NPC. This is because 2D facing is different based on whether it's a side scroller or top down, and whether you're rotating along an axis to flip the character or setting the sprite renderer's Flip X.
For a 3D game, use the LookAt() sequencer command. This rotates the subject to face the target. If you don't provide any parameters, it rotates the actor and conversant to face each other.
For a 2D game, you'll have to write your own sequencer command or handle it in a Dialogue System Events component set to OnConversationStart or use an OnConversationStart(Transform) method on the NPC. This is because 2D facing is different based on whether it's a side scroller or top down, and whether you're rotating along an axis to flip the character or setting the sprite renderer's Flip X.
Re: NPC Face player
Worked perfectly 
Thank you
Thank you