Focus/Unfocus Animation Trouble

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
PandaBOX
Posts: 8
Joined: Fri Aug 23, 2019 1:56 am

Focus/Unfocus Animation Trouble

Post by PandaBOX »

Hello there!

So, I've been trying to add Focus/Unfocus animations to my characters. Rather than focus/unfocus the whole portrait, I've made two nametags that are child objects to both Subtitle Panels. I made focus/unfocus animations just animating these nametags. So when the PC speaks, their name pops up, and when the NPC speaks, the PC's name disappears and the NPC's nametag appears.

However, I found that it's quite buggy. Currently, the whole portrait disappears if my PC talks to the same person twice. I think it's because it wants the whole portrait to unfocus, rather than just the nametag. Also, during a response, both of the character's name will appear. And afterwards, they will just stay up as the conversation continues.

But anyways, what I want is to show the nametag of the person currently speaking, then it disappears when the other character speaks. Is there a different way of doing this? Or is this the best way?

I hope I described this okay, let me know if I need to elaborate more!

Thanks for your time!
Attachments
example.PNG
example.PNG (8.5 KiB) Viewed 446 times
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Focus/Unfocus Animation Trouble

Post by Tony Li »

Hi,

Are you using version 2.2.0? It has improvements to the way focus is handled.

I'll put together an example scene so you can compare it with yours to look for any configuration differences. I'll post it here later today. (I'm going to be out of the office for a few hours right now.)
PandaBOX
Posts: 8
Joined: Fri Aug 23, 2019 1:56 am

Re: Focus/Unfocus Animation Trouble

Post by PandaBOX »

I'm actually not using the updated version!

I'll update it and get back to you!
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Focus/Unfocus Animation Trouble

Post by Tony Li »

Sounds good. I'm wrapping up work for the day. Here's an example scene:

DS_FocusNametagExample_2019-09-12.unitypackage
PandaBOX
Posts: 8
Joined: Fri Aug 23, 2019 1:56 am

Re: Focus/Unfocus Animation Trouble

Post by PandaBOX »

Alright, I'm now on the updated version!

Thanks for posting the example scene!

Unfortunately, I'm still having the same problem. Everything works until the character enters the same conversation again or a different one. It plays the characters hide portrait animation and then it's gone forever. I checked the example project and went back and forth between that and my project to make sure the settings were the same. As far as I can, tell they are.

Here's an image of my animator, maybe there is something here that is wrong?
Attachments
example.PNG
example.PNG (70.16 KiB) Viewed 439 times
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Focus/Unfocus Animation Trouble

Post by Tony Li »

When the dialogue UI closes, it run the main dialogue panel's Hide animation. As soon as this animation is done, it deactivates the GameObjects, even if the subtitle panels' Hide animation hasn't finished yet. This may leave your nametag in the "wrong" place.

The trick in the example scene I sent you is that the Show animation sets up the Portrait Name in its unfocused position so that it's ready to slide into view when the Focus animation plays.
Post Reply