Facing wrong direction

Announcements, support questions, and discussion for the Dialogue System.
hrohibil
Posts: 368
Joined: Thu Nov 04, 2021 12:50 pm

Facing wrong direction

Post by hrohibil »

Hello Toni

As seen below I a, still facing two issues-

1:
My invector character in all dialogues are facing the wrong way..

2:
Can that text UI (arrow pointing on below image) be lowered down?

User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Facing wrong direction

Post by Tony Li »

hrohibil wrote: Sat Mar 05, 2022 5:43 pm1: My invector character in all dialogues are facing the wrong way..
I have no idea. Which is the player? The character in the red and black checker shirt? Or the one wearing the baseball cap and hoodie?
hrohibil wrote: Sat Mar 05, 2022 5:43 pm2: Can that text UI (arrow pointing on below image) be lowered down?
Yes. Adjust your Unity UI layout. It's nothing specific to the Dialogue System. If you've based your UI on the Circle Standard Dialogue UI, you can probably just inspect the NPC Subtitle Panel's Horizontal Layout Group and change Child Alignment to Lower Center.
hrohibil
Posts: 368
Joined: Thu Nov 04, 2021 12:50 pm

Re: Facing wrong direction

Post by hrohibil »

Yes sorry for clarifying that.
The player is the one with the cap and glasses.
The one closest to the camera.

But even the AI is not facing him.
They don’t face each other’s??



Cheers
Hamid
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Facing wrong direction

Post by Tony Li »

Hi Hamid,

Does your player GameObject have a DialogueSystemInvectorBridge?

Is its "Face Conversant" checkbox ticked?

Is the correct NPC assigned to the Dialogue System Trigger's Conversation Conversant?
hrohibil
Posts: 368
Joined: Thu Nov 04, 2021 12:50 pm

Re: Facing wrong direction

Post by hrohibil »

Ahh

This line fixed a lot..

"Is the correct NPC assigned to the Dialogue System Trigger's Conversation Conversant?"

I had copy pasted the trigger to other NPCs.. So now the player is facing the NPC, but NPC still not facing the player?
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Facing wrong direction

Post by Tony Li »

In the NPC's first node, try setting the Sequence to:

Code: Select all

LookAt(listener, speaker); {{default}}
hrohibil
Posts: 368
Joined: Thu Nov 04, 2021 12:50 pm

Re: Facing wrong direction

Post by hrohibil »

I already have sequence camera setup so I have a good position of both.

Would the below code not override that?

I “just” need the NPC to face the player during a conversation

Cheers

Hamid
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Facing wrong direction

Post by Tony Li »

The LookAt() command rotates the subject ('speaker' in this case).
hrohibil
Posts: 368
Joined: Thu Nov 04, 2021 12:50 pm

Re: Facing wrong direction

Post by hrohibil »

Ok.

In the first node I already have this code in the Sequence:

SwitchCamera(GunshopCamera)

How can i combine that with LookAt(listener, speaker); {{default}}

EDIT:
What when the conversation is over, will the object return to previous orientation??
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Facing wrong direction

Post by Tony Li »

Hi,

Add it to your Sequence:

Code: Select all

SwitchCamera(GunshopCamera);
LookAt(listener, speaker); 
{{default}}
I recommend watching the Cutscene Tutorial Videos.
Post Reply