Making Camera Controls in Unity - Open Kinematic Character Controller

Поделиться
HTML-код
  • Опубликовано: 19 дек 2024

Комментарии • 17

  • @MiQuentin
    @MiQuentin Год назад

    thank you for this donation to asset flips, at least they'll control well now

  • @guest578
    @guest578 Год назад +1

    Same thing as at 6:56 should be done to the walls, instead of changing the zoom of camera.

  • @LZMP60
    @LZMP60 11 месяцев назад +1

    The thing i notice most is devs tend to set the default fov to like 60. I cant see anything! Give us fov sliders all the time 😭

  • @custardhilt
    @custardhilt 2 года назад +3

    Brilliant work!

  • @matlencina1235
    @matlencina1235 2 года назад +1

    amazing work, very informative

  • @orionblank3969
    @orionblank3969 2 года назад +3

    Hi good job. I looked at your project in git and saw some interesting things like "hit.distance == 0" where we are blocking movement and it's bad that the player won't be able to move anymore

    • @NickMaltbie
      @NickMaltbie  2 года назад +2

      Thanks! yes, the distance == 0 is what unity will return if the objects are overlapping (so it should actually be negative, but it doesn't support negative distances).
      In the case of negative distances, the best option is to attempt to push the player out before moving and I do that with the KCC but not with the simplified controllers as that code is more complex.
      The player shouldn't bounce "into" objects when moving so we only need to check for this overlap before or after moving. And if for some reason it does enter an object, we have that error case to avoid those kinds of situations. I call it an "invalid" bounce and just stop movement.

  • @TW-bh2mi
    @TW-bh2mi 2 года назад +5

    Great work.
    I am noticing a small ground detection glitch in your demo.
    The player sometimes does into the falling state when i go over the pyramids and hit the cube balls an up the slopes into a wall

    • @NickMaltbie
      @NickMaltbie  2 года назад +3

      Thanks for finding the bug! I’ve also seen this behavior. It happens because the player is considered to be “falling” when they are standing on a steep surface but this should be a state called “sliding” and have a different animation (maybe leaning to catch their balance?)
      I opened an issue on the GitHub to follow up and make a fix for this: github.com/nicholas-maltbie/OpenKCC/issues/64
      I want to replace the current KCC logic with a FSM and and am moving a bunch of the projection and other code into utility functions so it can be easily extended in the future. If you have any other suggestions or questions feel free to leave a follow up comment here or on the GitHub issue.

  • @olubunmiolumuyiwa
    @olubunmiolumuyiwa 2 года назад +3

    Great video!

  • @tufanaydin6340
    @tufanaydin6340 Год назад +1

    Hey question, i can't change "MinVerticalAngle" and "MaxVerticalAngle" when scene runs it turns default "-90 & +90" how can we change? i can't change.

    • @NickMaltbie
      @NickMaltbie  Год назад +1

      I’ll have to check it out. Haven’t seen that error yet :)

    • @tufanaydin6340
      @tufanaydin6340 Год назад

      @@NickMaltbie Oh please we having trouble. Like i said problem is min-max vertical angle can not changeable. When play mode start, it goes default. Also we can't change in runtime

    • @NickMaltbie
      @NickMaltbie  Год назад +1

      @@tufanaydin6340 I wasn't able to repro the issue but opened an issue on github. Coudl you post your steps to repro the problem?
      github.com/nicholas-maltbie/OpenKCC/issues/234

  • @makcings4764
    @makcings4764 Год назад

    How would i use Cinemachine and the Kinematic Character Controller Together?