Search Unity

Character Controller Collider Help

Discussion in 'Physics' started by Handrewsenti, Oct 2, 2019.

  1. Handrewsenti

    Handrewsenti

    Joined:
    Apr 20, 2018
    Posts:
    4
    Basically i need to make a collider out of the capsule of the Character controller, an extension of it or simple change the shape of the collider.

    My character can pick up a box and hold it, what i want is that the character controller collider adapts to the box shape or reacts to collisions a little more forward.

    I will attach an image of the situation...

    I need that the box collider reacts to collisions as a part of the character controller, or as i said to engrow the front part of character controller, but not the other directions.
     

    Attached Files:

  2. TimmyTheTerrible

    TimmyTheTerrible

    Joined:
    Feb 18, 2017
    Posts:
    186
    You could use ray/shere casting while holding a object to check for space for the controller.

    This I have done in the past for characters that can push/pull blocks. I capture the push/pull animation velocity from the animator then use ray/sphere casting to ensure there is enough room for the movement before applying the velocity to the controller.
     
  3. Handrewsenti

    Handrewsenti

    Joined:
    Apr 20, 2018
    Posts:
    4
    I would rather just edit the collider a little so that it is larger forward when I have the cube or make the cube collide as if it were part of the character controller.