Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Character controller collides a trigger

Discussion in 'Editor & General Support' started by Aldwin, Mar 1, 2013.

  1. Aldwin

    Aldwin

    Joined:
    Feb 18, 2013
    Posts:
    12
    Hi!

    I have troubles with my character controller colliding a boxcollider while it's setted as "Is Trigger".

    I'm a 2D toolkit animated sprite with a Unity's character controller component.

    Some pictures:
    $colliderIssue1.PNG $colliderIssue2.PNG $colliderIssue3.PNG

    Sorry for my english and thanks for your help :)
     
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
  3. Aldwin

    Aldwin

    Joined:
    Feb 18, 2013
    Posts:
    12
    Thanks for your answer.

    I looked at the matrix but it did'nt help me : my box collider is supposed to be a "static trigger collider" and, according to the matrix, no collision detections is supposed to occur, whatever the other object is...
     
  4. Aldwin

    Aldwin

    Joined:
    Feb 18, 2013
    Posts:
    12
    I just spent 3 hours to understand why it doesn't work and I can't find nothing.
    I tried with a standard character controller (not a 2D toolkit sprite) and it's the same.
    Maybe I'm missing something ? If someone could help me, I would be very happy :)
     
  5. lorenalexm

    lorenalexm

    Joined:
    Dec 14, 2012
    Posts:
    307
    Something easily overlooked, but not explicitly stated within your posts, does either the trigger or the GameObject colliding with the trigger contain a Rigidbody component? My appologies if this is contained within the images, but I am unable to see any.
     
  6. Aldwin

    Aldwin

    Joined:
    Feb 18, 2013
    Posts:
    12
    Hi lorenalexm and thanks for your interest.

    No, no Rigidbody component on the character controller nor on the trigger.
     
  7. Aldwin

    Aldwin

    Joined:
    Feb 18, 2013
    Posts:
    12
    OK, i just found the solution : in Projects settings > Physics, there is a litthe checkbox called "Raycasts Hit Triggers" which have to be unchecked !

    As the Unity's default Character Controller manage collisions with raycasts, the player was stopped with the trigger.

    I can't imagine this option is checked by default, I guess I turned it on before and didn't remember...
     
  8. Hybris_Team

    Hybris_Team

    Joined:
    Oct 17, 2015
    Posts:
    114
    Oh my god thank you from the bottom of my heart haha. I have been literally going insane trying to figure out why my character controller was hitting triggers...The "Raycast Hit Triggers" is now called "Queries Hit Triggers". Thank you again!!!!
     
  9. WARW0LF

    WARW0LF

    Joined:
    Oct 1, 2016
    Posts:
    15
    The setting is now called 'Queries Hit Trigger'

    my character controller was landing on top of a detection collider on a moving platform, which was strange since it's a trigger but removing this setting makes things work properly, thank you so much for this
     
  10. Puchaczu

    Puchaczu

    Joined:
    Jul 8, 2019
    Posts:
    1
    Guys, thank you soooo much, this thread saved my project!