Forum rules - please read before posting.
Tech questions during the weekend? Drop in on the community Discord channel!

Bug with triggers

Hello forum, I have a strange problem. I don't know if its actually a bug or I'm doing something wrong, but I'm sure its a bug xD.

I have a player prefab, and inside this player there is an AC trigger. whenever I turn it on, an action will happen. The problem is the trigger only works when my player has CC (character controller). It will not work when the player has capsule collider, and yes I've set it to "is trigger".
I can't figure out why it only works with character controller.. How can I make it work with capsule collider instead? 


  • Your wording leaves me unclear if the Trigger is a child of the player, or that the player is inside the Triggers volume.  Is this a regular Trigger in the scene?

    The Trigger works using Unity's own OnTriggerEnter method - meaning you need a Rigidbody as well in order for it to react to colliders.  The 3D Demo player, Tin Pot, set up this way to test with as well.
  • The trigger is a child of the player and its an adventure creator trigger. I forgot to mention that the trigger is set to "Asset file" 

    To recreate the issue, take Tin Pot and create an AC trigger. Make it a child of Tin Pot then set the trigger's actions source from "in scene" to "Asset file" . Save the prefab, then when you hit play you will notice that the trigger is not working, unless you use character controller on Tin Pot..

    I tried playing around and figuring it out but with no luck, so i'll leave it to the professionals .. 
  • What is it you're trying to detect with the Trigger?  I'll need a shot of the Trigger's full Inspector to accurately reproduce.
  • Well, my character has an animation and when that animation finish.. I want it to check a specific variable, and I can't do that so I figured I would use a trigger inside the player to check everytime the animation finish by turning it on and off.. That is my goal. However as I mentioned the trigger only works when my player has character controller..  

    1. Here I have the trigger inside the player and its turned off.


    and the character has only capsule and rigid body. No character controller.


    when I turn it "on" nothing happens.


    and finally here when I have character controller on the player and I turn on the trigger it works..


    So the problem is why its only working with character controller? 
  • It could well be that Unity has an in-built safeguard against triggers reacting to parent colliders, which doesn't account for character controllers.  AC merely uses the provided OnTriggerEnter method to detect objects, so any quirks related to it will be built into Unity itself.

    Regardless, having a Trigger detect a parent isn't good practice - and sounds like the wrong solution to a simple problem.

    Please elaborate on the root problem you're trying to solve.  You want to run some Actions when a particular animation has finished, correct?  And how are you trying to do this, by animating the "enabled" state of the Trigger when the animation completes?

    Instead of having a Trigger, attach a Cutscene component to the same object as your character's Animator.  Set the Cutscene's Actions source field to Asset Field, and then re-assign the same "New ActionList" asset field you were referencing in the Trigger.

    You can then run an Animation event at the end of your animation, in which the Cutscene's "Interact" method is invoked.  That will cause the Cutscene - and ActionList asset that it references - to run.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.