Search Unity

Rotating character controller and/or collision.

Discussion in 'Scripting' started by Grievemourne, Dec 3, 2012.

  1. Grievemourne

    Grievemourne

    Joined:
    Oct 19, 2012
    Posts:
    15
    I've had trouble with collision detection as my character rotated, and I realized it's probably because the character controller (or the green envelop when viewed in the view port, at the very least) does not seem to be affected. is there any way around this, or is this just an unavoidable quirk?

    I just need to make sure the game registers the player as being "grounded" so I can allow him to jump, and thought about linking objects to the character that rotate with it and give information when they've collided with something as opposed to when the actual character has done so. This is, however, very roundabout, so I thought I'd specify my goal further and ask here in case you know of better ways.
     
  2. Asii

    Asii

    Joined:
    Sep 28, 2012
    Posts:
    53
    dont know what you mean about the rotating.

    for is grounded its really simple
    use
    OnCollisionStay, OnCollisionExit. you could also use raycast.