Using OnTriggerEnter properly to trigger a conversation
Posted: Fri Jan 13, 2017 5:22 pm
Hiya, just bought the asset, this is my first post here. Really amazing!
I know there was a post about this but I got lost trying to understand it. What I want to do is simple: trigger a conversation with an NPC when the player enters the NPC's sphere collider. What I have done so far:
- make sure that the npc's Sphere Collider on the NPC has the IsTrigger property set to true;
- add the Converstation Trigger component to the NPC with the trigger property set to OnTriggerEnter.
- The dialogue Manager is in the scene with an initial database assigned.
Now, what happens is that when I start the scene, the dialog is displayed right away, as if the OnTrigger condition was met. However the player is far from the NPC and I know the Sphere Collider works (as I am using it for other OnTriggerEnter events on other components).
Anything I am missing here? Or do you have a best guess that would point me in the right direction?
Many thanks,
- Jeff
I know there was a post about this but I got lost trying to understand it. What I want to do is simple: trigger a conversation with an NPC when the player enters the NPC's sphere collider. What I have done so far:
- make sure that the npc's Sphere Collider on the NPC has the IsTrigger property set to true;
- add the Converstation Trigger component to the NPC with the trigger property set to OnTriggerEnter.
- The dialogue Manager is in the scene with an initial database assigned.
Now, what happens is that when I start the scene, the dialog is displayed right away, as if the OnTrigger condition was met. However the player is far from the NPC and I know the Sphere Collider works (as I am using it for other OnTriggerEnter events on other components).
Anything I am missing here? Or do you have a best guess that would point me in the right direction?
Many thanks,
- Jeff