Search Unity

Tilted Rigidbody Moves Up with Negative Y Force?

Discussion in 'Physics' started by Flaring-Afro, Jun 6, 2020.

  1. Flaring-Afro

    Flaring-Afro

    Joined:
    Jul 20, 2015
    Posts:
    14
    Hello, I'm working on a character that will walk up walls so I'm using rigidbody (rather than charactercontroller). My problem has been that if standing on a slope, the character (and its rigidbody) are tilted to match it but then if I move the thumbstick toward the character's head, the character floats up. I was using standard AddForce and debug says it has a negative Y... The weird thing is using AddRelativeForce fixes this and the character no longer moves up, though the movement direction changes if I have the character rotates in the thumbstick direction (as expected).

    Why would this behavior be happening? I would think the floating up would happen during relative force, not the standard and a negative Y would always push the rigidbody down the global Y axis when using AddForce.