КОМЕНТАРІ •

  • @pewpew518
    @pewpew518 2 роки тому +2

    In my implementation, character jumps in the direction of input at an angle. For example if the character is moving forward and player pushed joystick back the player will jump back wards however the angle will be 45 degrees upwards. This angle can be tuned. If there is no movement Inout player will jump straight up in place. I also have what I called "anticipation time" this isn't jump time but a part of jump. It's a small delay before jumping. This allows for the squat down part of jump to be completed on ground before jump and also allows for the player to rotate and face in input direction of the jump before jumping.

    • @NickMaltbie
      @NickMaltbie 2 роки тому +2

      That’s a neat idea to rotate jump in direction of motion. That’s at they jump farther when moving forward or whatever direction they decide.
      Anticipation time also seems interesting, it could allow for some error correction before jumping. I’ve seen this feature added for games where you would control a slow moving mech so taking extra time to correct a jump helped it feel like a very powerful jump with lots of animations and post processing.
      When testing out the jump feature with my friends we found that an instantaneous jump was the most natural flow so I’m curious what you used for this anticipation delay time. In our tests it felt more natural to jump the same frame you hit the jump button even if it skipped the jump animation and it felt easier to control. Although we were designing a multiplayer racing platformer game so precise inputs weren’t the main focus.

    • @pewpew518
      @pewpew518 2 роки тому +1

      @@NickMaltbie I think instantaneous jump makes perfect sense for say a platformer type game or a game in which you u need super responsive movement like overwatch. Also there's a big difference between our implementations . in your controller player always looks in the direction of the camera. In mine its a more typical third person controller where player moves relative to camera. also that jump anticipation is very small, few frames but it is slightly noticeable . If I'm not wrong I think ghost of tsushima does this, a slight anticipation before jump. I think this makes the jump more impactful and juicy. But again I'm making a open world RPG so I don't need instantaneous responsiveness for everything , I value the game feel more .

    • @NickMaltbie
      @NickMaltbie 2 роки тому

      Yes, I want to add the ability to move in a different direction than the camera (or at least have the player point in the direction they are moving). Adding that plus IK to the feet are two big things I want to add to improve the visuals.
      Each game has very different requirements and the idea that one piece of code could handle all use cases would lead to far too many parameters. I like sharing notes and code so hopefully the open source project will prove useful for someone’s future project and learning more about coding.
      Good luck on your project! I would love to see those sample jumps if you have any videos or demos, it sounds like an interesting scenario (although sometimes stuff is confidential during dev so no pressure to share if you aren’t able).

  • @NeatGames
    @NeatGames 2 роки тому +1

    Very interesting! I'm using a 3rd Person character asset from the Unity store in my current project. I can't code all this haha

    • @NickMaltbie
      @NickMaltbie 2 роки тому +1

      Using assets from the store is a perfectly reasonable solution. It still takes quite a bit of skill to use someone else’s project and get it working in your use case.
      I have a simplified demo of the KCC movement linked in the video description if you’re interested in how the code works. And the full version as well, but that code is a bit more complex.
      I’ve been working on this project for a bit over two years and still keep finding and fixing basic bugs as I add and adjust features so maybe spending some money on a store bought asset would have been the easier solution. Good luck on your project!

  • @RichardHao-x8y
    @RichardHao-x8y Рік тому +1

    Great series of videos, really interesting to hear it all. I havn't had the opportunity to try the demo out but I'm wondering if this controller solves the issue of falling through floors at high speeds (i.e jumping off a cliff)? If so, what's the method used and how does it ensure such behaviour?
    thanks!

  • @whitesilver5575
    @whitesilver5575 2 роки тому +1

    This is an amazing series! I learned a lot from the previous videos in short amount of time.
    Anyway, Do you know the solution that will avoid the character controller from standing on top of another character?
    I see this in a lot of AAA titles but it seem impossible when i try to do it myself.
    The solutions i found on the internet doesn't seem to be the same approach as their solution says that i should get the ground normal and slide/bounce from there by changing the velocity, and it just doesn't feel tight if i try that approach.
    Thank you for sharing you knowledge with us!

    • @NickMaltbie
      @NickMaltbie 2 роки тому

      Hi, that is actually a more complex requirement.
      I am designing a kinematic character controller that uses kinematic movement to avoid clipping and jittery movement that might come from a default rigidbody. Whenever the player is standing on a surface that is to "steep" or not on anything at all they start "sliding" down. I'm going to change to a state machine-based model and call this state sliding when they are standing on something but slipping down and unable to jump.
      I'm assuming this is the kind of behavior you would like to have from your character controller as well. In this case, I would label other character as a "sliding" or "no stand" surface where they will start accelerating downwards and sliding off the character that they are standing on. I have another video on Moving Characters in Games for how I achieve this for my Kinematic Character Controller design.
      I just updated the docs via PR #85 for the project github.com/nicholas-maltbie/OpenKCC/pull/85
      If you have any questions let me know!

    • @whitesilver5575
      @whitesilver5575 2 роки тому +1

      @@NickMaltbie the effect i wanted to happen were the same as the one in fighting games when they try to jump over especially when on a corner, they never stand on top. their sliding also never break the fall, they fall like there were never a character below them.
      i think I'll somehow get a similar result if i try to project the character's collider like on your previous video.
      thanks for responding!

  • @Patricebrouh
    @Patricebrouh 5 місяців тому +1

    Hi! In the vodeo, when Mario jumps, the camera doesn't follow him. Can you show me how to implement it? Thanks

    • @NickMaltbie
      @NickMaltbie 5 місяців тому +1

      It’s called vertical damping. Unity has a standard implementation of it in their cinemachine package. It’s used in lots of games to make camera motion smoother.

    • @Patricebrouh
      @Patricebrouh 5 місяців тому

      @@NickMaltbie Thank you

  • @dec_ves2190
    @dec_ves2190 3 місяці тому +1

    I do have a question, how can i add air control in this? Most games allow you to move in the air with limitations like not being able to move in the air instantaneously and also using a and d keys to strafe. Is there any way to add them?

    • @NickMaltbie
      @NickMaltbie 2 місяці тому

      Yes, lots of existing character controllers have a “IsGrounded” or equivalent property. You can add a check when you apply player input to limit or modify player movement based on this property.

  • @watercat1248
    @watercat1248 Рік тому

    In my game the player able to move in the air with the same speed ground and the have air jump as well (double jump)
    However the ground check need important for sure
    Wail my game it's fps I have multiplayer I have plan to to add some platforming action in my game
    Like for example one way floor bunch pad ECT
    But I have not figured out how to add one way floor that doesn't have enge issues in 3D collider

  • @jovlem
    @jovlem 9 місяців тому

    At 2:55 , how do you get the angle? Are you using the surface normal OR the normal from the collisionshape?

  • @pierrethehandsome2518
    @pierrethehandsome2518 2 роки тому +1

    Is there a way to disable or minimize air movement in your particular project?

    • @NickMaltbie
      @NickMaltbie 2 роки тому +1

      Yes actually, in the GetProjectedMovement function I compute the player speed using the "isSprinting" state. Instead of using just the isSprinting state, you could add another check for (OnGround) and if (OnGround) is false, you could decrease the player's movement speed.
      Vector3 movement = RotatedMovement(inputMovement) * (isSprinting ? sprintSpeed : walkingSpeed);
      github.com/nicholas-maltbie/OpenKCC/blob/aaee7058baf33e6f4532e115cc4cbb7c1b6dff2b/Assets/OpenKCC/Scripts/Character/KinematicCharacterController.cs#L821
      I also saw that you left a comment earlier about not being able to download the files but didn't get chance to respond. Make sure to download the git-lfs assets :)

    • @pierrethehandsome2518
      @pierrethehandsome2518 2 роки тому +1

      @@NickMaltbie Thank you for the advice! yes I had an issue with the download earlier, but it was just me being stupid lol

    • @NickMaltbie
      @NickMaltbie 2 роки тому +1

      @@pierrethehandsome2518 Great, I hope the adjustment works for your use case. I'm going to try and update it to a FSM based design so it will be more modular in the future and easier to edit values like movement speed in different states (such as falling).
      Git-LFS can be tricky, not a stupid mistake at all. It took me quite a few attempts to get it right and even longer to get it working in the CI/CD pipeline for my project.
      Good luck on your project, I'd love to hear any updates or examples of people using the OpenKCC project. I'm happy to help out with hwo to use the projects as I continue to document, make videos, and add more features.

  • @moon..9852
    @moon..9852 2 роки тому

    how can i use the kcc with my animation >> help pls

    • @NickMaltbie
      @NickMaltbie Рік тому

      Hi, what’s your question with adding the animation to the KCC? There are some examples in the GitHub repo as well.

  • @Pravda-bw3tj
    @Pravda-bw3tj 3 місяці тому

    ur controller shit what a state machine... with attributes.