Where to put the interaction collider?
Posted: Thu Aug 22, 2019 10:42 am
Hi Tony, we spoke about this on email earlier, but I noticed something new regarding the collider placement.
My Player is setup like this to make it simple:
Player
+- Dialogue Actor (The component, on a child gameobject)
+- Points (Different child objects, with points for attachments, etc)
I have a collider with a tag, PlayerInteractions, that is required for all Dialogue System Triggers that the player should trigger. I can put the collider as a child to any of the two child objects above.
I have two Triggers with Actor not specified:
A) Conversation with a NPC not in the scene. Player speaks in a bubble, NPC speaks in the Standard UI.
B) Bark with Source=Text, where I want the Player to bark a line of text, without creating a conversation for it.
The placement of the collider gives different results regarding who speaks:
Collider as a child of DIalogue Actor
A) The player overrides the conversation, and speaks the NPC's lines and the opposite.- INCORRECT
B) The player speaks - CORRECT, (since the collider is a child of the Actor i believe).
Collider as a child of Points
A) The NPC and player each speak their own lines - CORRECT
B) A random (?) NPC Actor gets assigned and does the barking. - INCORRECT
So as you can see, none of the solutions above is perfect.
I can specify an Actor for any NPC that is in the scene, but my player is spawned into the scene, so I don't have a reference to it, that I can assign. And the "NPC not in the scene" can't be assigned either.
So can I override the behaviour somehow, so an empty Dialogue Actor assigns the Actor from the conversation, and in case of a bark, assigns the player, if none is assigned?
I understand and appreciate the ability to reuse conversations for multiple actors, but it would be great if it would assign the player normally.
I'm sure you have some great workaround that solves all this, or if I should maybe make a script to assign the player to empty actor slots on spawn or something like that.
Thank you!
My Player is setup like this to make it simple:
Player
+- Dialogue Actor (The component, on a child gameobject)
+- Points (Different child objects, with points for attachments, etc)
I have a collider with a tag, PlayerInteractions, that is required for all Dialogue System Triggers that the player should trigger. I can put the collider as a child to any of the two child objects above.
I have two Triggers with Actor not specified:
A) Conversation with a NPC not in the scene. Player speaks in a bubble, NPC speaks in the Standard UI.
B) Bark with Source=Text, where I want the Player to bark a line of text, without creating a conversation for it.
The placement of the collider gives different results regarding who speaks:
Collider as a child of DIalogue Actor
A) The player overrides the conversation, and speaks the NPC's lines and the opposite.- INCORRECT
B) The player speaks - CORRECT, (since the collider is a child of the Actor i believe).
Collider as a child of Points
A) The NPC and player each speak their own lines - CORRECT
B) A random (?) NPC Actor gets assigned and does the barking. - INCORRECT
So as you can see, none of the solutions above is perfect.
I can specify an Actor for any NPC that is in the scene, but my player is spawned into the scene, so I don't have a reference to it, that I can assign. And the "NPC not in the scene" can't be assigned either.
So can I override the behaviour somehow, so an empty Dialogue Actor assigns the Actor from the conversation, and in case of a bark, assigns the player, if none is assigned?
I understand and appreciate the ability to reuse conversations for multiple actors, but it would be great if it would assign the player normally.
I'm sure you have some great workaround that solves all this, or if I should maybe make a script to assign the player to empty actor slots on spawn or something like that.
Thank you!