Search Unity

CharacterController.Move documentation is incorrect

Discussion in 'Documentation' started by Deleted User, Aug 11, 2019.

  1. Deleted User

    Deleted User

    Guest

    First, You need to use normalized input direction to avoid having diagonal movement advantage.
    Second, Gravity calculation is so f**ked up. I don't know who wrote that but it's straight bullshit. The doc tries to fix its incorrect gravity calculation with increasing gravity.
    Gravity * deltaTime * deltaTime gives you delta velocity which you need to add to current velocity of the object. You don't add that to movementMotion which is a movement delta.
     
    fdp_san and RxGian like this.
  2. yant

    yant

    Unity Technologies

    Joined:
    Jul 24, 2013
    Posts:
    596
    Not sure why would you use explicit language, as it was clearly not needed, especially when your main claim simply can't be true. Acceleration is the second derivative of position - that means you need to integrate acceleration twice to get position (in discreet terms - multiply by delta t squared). Anthony. Read up here: https://en.wikipedia.org/wiki/Acceleration
     
  3. RxGian

    RxGian

    Joined:
    Mar 21, 2018
    Posts:
    82
    I think you're right, but Character Controller is for simple movement purpose. So it's no need to implements advanced things such as physics to make user/developer implements their own methods.

    For me, I use my own gravity which it not always y = -9.8
    I make some level similar with Gravity level on megaman 5 which is gravity upwards ceiling or like Super mario galaxy which is affected movement rotation space and more complicated