3rd Person Controller - Unity's New Input System

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ย. 2024

ความคิดเห็น • 322

  • @sakrefunholy
    @sakrefunholy 2 ปีที่แล้ว +5

    Amazing video and helped me understand how the new input system works, but i'm having some issues with my player character constantly going up in the air. I can move around and turn but it seems like he is constantly jumping up into the sky. what could be the issue?

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      At 16:31 there was an error with on-screen text pointing it out. The error does effect the jump. Could that be the issue?

    • @sakrefunholy
      @sakrefunholy 2 ปีที่แล้ว

      @@OneWheelStudio well, I saw it and already made the change but that still makes the character float upwards constantly. I even tried copy paste the one from your github, but it still has the issue.

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      Is it possible you have gravity turned off on the rigidbody?

    • @sakrefunholy
      @sakrefunholy 2 ปีที่แล้ว +3

      @@OneWheelStudio nevermind, I found out what the issue was. the issue was that I had the capsule collider as a trigger. which for some reason made it the character go up into the air.

  • @centauriboy
    @centauriboy 2 ปีที่แล้ว +128

    For anyone using Unity version 2021.2.4f1 or higher, in order to select "Add 2D Vector Composite", you need to change the Action Type to "Value" and the Control Type to "Vector 2" in the Action Properties, then you can press the plus sign and it will be called "Add Up/Down/Left/Right Composite".

  • @eddyrc7
    @eddyrc7 2 ปีที่แล้ว +8

    For anyone not finding creating "input actions", you need to install the input system from your package manager before the first step in this tutorial.

  • @OneWheelStudio
    @OneWheelStudio  3 ปีที่แล้ว +42

    Do you like this style of video? Longer, less scripted, and admittedly less concise? Or would shorted scripted videos be more helpful?

    • @_Garm_
      @_Garm_ 3 ปีที่แล้ว +6

      i like this style :)

    • @VirtusH
      @VirtusH 3 ปีที่แล้ว +1

      this was a decent vid, but shorter scripted videos are definitely better IMO

    • @allanl5511
      @allanl5511 3 ปีที่แล้ว +3

      This is great! So far the best video I found showing how to implenment the new Input System, Cinemachine, Animation and putting it altogether.
      Instead of a series of videos in a long tutorial, I really dig this relatively short form.
      p.s. the timestamps are really helpful too, thank you.

    • @alexstankovic2947
      @alexstankovic2947 2 ปีที่แล้ว +1

      This type of videos where you can actually see the bigger picture and the architecture of making games, but at the same time you cover every component and technique that makes up that bigger picture. Big thanks!

    • @davidReyGD
      @davidReyGD 2 ปีที่แล้ว +1

      Great video! thank's a lot for your work ;)

  • @99darkprince
    @99darkprince ปีที่แล้ว

    I have been watching a lot of Unity tutorial videos trying to get a better understanding of both the new Input System as well as being able to better understand Unity with creating my game and I have to say this has to be the most helpful and beginner friendly tutorial I have seen, and it really allowed me to better understand how to work with creating a character controller. Thank you so much for making this video it has helped me tremendously get better at making my own games!

  • @jeremylamy6456
    @jeremylamy6456 2 ปีที่แล้ว +2

    This video is what I have been looking for for a week. Thanks a lot, great content !

  • @muhammadumair6306
    @muhammadumair6306 3 ปีที่แล้ว +2

    There's always, like ALWAYS something new to learn in your videos. Love your content. ❤

  • @markuskankare2911
    @markuskankare2911 2 ปีที่แล้ว +1

    Thank you so much! You helped me a lot. I'm new with Unity and C# but after this video I made big steps forward with my project and skills. One step at a time :) More videos like this and I would like to see long video where we could make full game from start to finish.

  • @goodsonguitars
    @goodsonguitars ปีที่แล้ว

    I have been trying to wrap my head around this new input system and thanks to you, I think I about have a grasp on it. Thank you for your time and effort. Liked and subbed.

  • @jameshenderson1826
    @jameshenderson1826 2 ปีที่แล้ว

    Excellent tutorial! Thanks very much. I don't normally comment on many tutorials but felt I had to in this case. I really like your approach and feel that you've helped me take my understanding of Unity character controlling and physics to the next level. Cheers and keep up the great work. ;-)

  • @morningforeststudio8596
    @morningforeststudio8596 2 ปีที่แล้ว +1

    Awesome video about third person controller! Thanks!

  • @umapessoa6051
    @umapessoa6051 3 ปีที่แล้ว +3

    Hi, thank you for this video, love the video style, keep up with the good work.

  • @kylershahalami6453
    @kylershahalami6453 5 หลายเดือนก่อน +1

    I found out how to get the jump to work for me!
    I created a new private float at the top and named it "RayRange" and set it to 1.25f
    After that, I went down to the private bool IsGrounded() function and changed it to the following:
    private bool IsGrounded()
    {
    Vector3 direction = Vector3.down;
    Ray ray = new Ray(this.transform.position, transform.TransformDirection(direction * RayRange));
    if(Physics.Raycast(ray, out RaycastHit hit, RayRange))
    {
    return true;
    }
    else
    {
    Debug.Log("not grounded");
    return false;
    }
    }
    Hope this helps some folks!

  • @angrypug9841
    @angrypug9841 4 หลายเดือนก่อน +3

    The NEW way to set up the 2d Vector is as follows :(
    Click on Move
    Go to Binding Properties and select "Action Type: Value" then "Control Type: Vector 2"
    THEN you can right click Move and Add Up/Down/Left/Right Composite will show up.
    It will then add a 3d vector to your drop down for WASD.
    So stupid of them to switch that up

    • @bpdhoplite
      @bpdhoplite 2 หลายเดือนก่อน

      Thank you so much

  • @Hoglet.Interactive
    @Hoglet.Interactive 3 ปีที่แล้ว +1

    Another great tutorial from O.W.S. Cool!

  • @fess24
    @fess24 3 ปีที่แล้ว +1

    Thanks a lot for the video! Very informative and understandable.

  • @vj711
    @vj711 7 หลายเดือนก่อน +2

    I have this error.
    I have done everything as the video.
    No i didnt type the code in ondisable to onenable.
    Null reference exception: Object reference not set to an instance of an object ThirdPersonController.FixedUpdate()

    • @Seshua87
      @Seshua87 7 หลายเดือนก่อน +1

      NRE: Object ref is normally because something is not being linked together, go through your code, and your hierarchy and make sure you link everything that should be, i.e make sure your camera is linked. Small tip, it's really hard for someone to help you when we can't see your code, 98% of the time it's a typo. Try pasting your code into a reply message and someone might be able to spot the problem.

  • @sepehr2371
    @sepehr2371 ปีที่แล้ว

    Nice video, you could probably use some comments on methods you create so that it is more understandable for future use

  • @gamedevarchive614
    @gamedevarchive614 2 ปีที่แล้ว +1

    I keep getting camera jitter as well as I'm completely frozen in y space. I don't go up or down.

    • @johnpotesta3744
      @johnpotesta3744 ปีที่แล้ว

      any resolution to this? my gameplay is really jittery and was thinking it has to do with the animator.

  • @S4von
    @S4von 3 ปีที่แล้ว +1

    Wait, doesn't the current melee code let player spam attack? Animation will play fine but if we were to put damage mechanic, player would be able to do damage several times during animation just by pressing attack constantly.

    • @OneWheelStudio
      @OneWheelStudio  3 ปีที่แล้ว +1

      Not exactly, but the solution shown also isn't pefect. As shown the player can press the button once and the animation will run and if they press the button again the trigger will get set and when the melee animation finishes it will immediately play again. To resolve this you could check the which animation is playing. You could also dive in to Animation State Behaviors which allow really good control/knowlege of the animation state.
      Check Animation: www.reddit.com/r/unity_tutorials/comments/owryhj/3rd_person_controller_new_input_system/
      Unity Animatin State Behavior: docs.unity3d.com/ScriptReference/StateMachineBehaviour.html

  • @saisushant623
    @saisushant623 18 วันที่ผ่านมา

    Hey I have Downloaded The Toony Tiny People package But all the materials appear pink, how can I fix it.\

    • @OneWheelStudio
      @OneWheelStudio  18 วันที่ผ่านมา

      This happens because something is wrong with the shader. Are you using URP? If so there is an option, I believe, it’s at the bottom of the edit menu to convert materials.
      My guess is the materials are using an older “built-in” shader and you need to switch to a URP or HDRP shader.

  • @FrozenWell
    @FrozenWell 3 ปีที่แล้ว +1

    Cheers for this, great tutorial

  • @juliaalder2007
    @juliaalder2007 3 ปีที่แล้ว +1

    This is very cool. Would you please do a tutorial to show how to combine melee animation with the third person from the starter assets? The code seems to be different. Thanks for this video! :)

    • @Guacamakis
      @Guacamakis 2 ปีที่แล้ว +1

      Have you found anything on this? Cause I'm struggling too

    • @juliaalder2007
      @juliaalder2007 2 ปีที่แล้ว

      No, not really. But I think you can combine Mixamo animations and the starter assets. So you could parent a sword to the hand? But I'm not sure about this.

    • @pranjaldevstuff8395
      @pranjaldevstuff8395 ปีที่แล้ว

      @@juliaalder2007 If you find anything on that then please tell here. And also in this tutorial when I press the W key , the player directly runs from idle when he should just walk. Can you tell how to fix it?

  • @pranjaldevstuff8395
    @pranjaldevstuff8395 ปีที่แล้ว

    How can I make my character run only when i am pressing the shift key? It always transitions into run animation just by pressing the W key...

  • @kozmobotgames
    @kozmobotgames ปีที่แล้ว

    Amazing video, but when I press Space on my keyboard, the player does not jump. How can I fix it?

  • @tdr7481
    @tdr7481 2 ปีที่แล้ว

    for me there is no mouse delta showing up, I tried pass through and vector2 also value and vector2, any ideas how to solve this?

  • @addisonjacoby
    @addisonjacoby 2 ปีที่แล้ว

    Why do we only multiply the jump descent by Time.fixedDeltaTime isn't everything in FixedUpdate frame rate independent? Also, curious why you choose not to use a CharacterController?

  • @crowbartwisted8738
    @crowbartwisted8738 7 หลายเดือนก่อน

    For anyone who couldn't get the jumping to work , modify your isGrounded function as follows , and create a layer of your choosing and give it to the object you're using as floor , and it should work
    private bool IsGrounded()
    {
    float rayLength = 0.3f;
    Ray ray = new Ray(transform.position + Vector3.up * 0.1f, Vector3.down);
    int layerMask = LayerMask.GetMask("INSERT LAYER NAME HERE");
    if (Physics.Raycast(ray, out RaycastHit hit, rayLength, layerMask))
    {
    return true;
    }
    else
    {
    return false;
    }
    }

  • @LasaventurasdeSaldi
    @LasaventurasdeSaldi 2 ปีที่แล้ว

    I loke how in 3:22 you're correcting yourself when you said it right xD

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      Ha! I go a bit cross eyed editing these long videos.

  • @BlenderSV
    @BlenderSV 3 ปีที่แล้ว +1

    Great video, very helpful!!
    Is there a part 2 related to the zombies?
    (can't find it, lol)

    • @OneWheelStudio
      @OneWheelStudio  3 ปีที่แล้ว

      No there isn’t but if you check the links in the description you should be able to get the code used for them - it’s pretty basic though.

    • @BlenderSV
      @BlenderSV 3 ปีที่แล้ว +1

      @@OneWheelStudio thank you so much!!

  • @sainteven8181
    @sainteven8181 3 ปีที่แล้ว

    One point to square roots calculation in general. This isn't slower anymore most compiler these day can do it in 1 cpu clock cycle. It cant get any faster then this. :)

  • @TechWrathTV
    @TechWrathTV 2 ปีที่แล้ว

    You are a LIFE SAVER mate :D

  • @joseluisRueda
    @joseluisRueda ปีที่แล้ว +1

    great tutorial , thanks

  • @cecilloki
    @cecilloki 3 ปีที่แล้ว

    Hey @One Wheel Studio I dont know how to get when the mouse button down for example, could you help me, because I need set an animation for an action that need hold the button down

  • @HoneyBoySoSweet
    @HoneyBoySoSweet 2 ปีที่แล้ว

    Excuse me, I want to know how to connect the gamepad for PC Building Game in Unity?

  • @HeartWulf
    @HeartWulf 3 ปีที่แล้ว +1

    Hey! Thank you for the video, it's been really helpful. How would you go about smoothing out the character rotation in this code? Look rotation is giving me very snappy results.

    • @OneWheelStudio
      @OneWheelStudio  3 ปีที่แล้ว +1

      I haven't played with that myself, but you could add a scaling processer to the binding. It will give you x and y values or 1, make that 0.5 and I'd guess your rotation will be slower and maybe smoother?

    • @Smokey-A
      @Smokey-A 2 ปีที่แล้ว +2

      Quaternion toRotate = Quaternion.LookRotation(direction, Vector3.up);
      this.rb.rotation = Quaternion.RotateTowards(rb.rotation, toRotate, 10f);

  • @T_D_E_V
    @T_D_E_V 2 ปีที่แล้ว

    Amazing video and helped me understand how the new input system works, and can u make tutorial how to make so that when i click control when player moves this player slows down and goes on walk animation

  • @NewYorkNixDa
    @NewYorkNixDa ปีที่แล้ว

    Really awesome tutorials, you made! 🙂
    Little question: How can i change / blend the animations for crouching / proning? im a bit struggling to get it 😞

    • @OneWheelStudio
      @OneWheelStudio  ปีที่แล้ว +1

      Thanks! ☺️ the blending is handled in the transition. Unity will usually do a good job for you but in the transition you can tweak the settings.

    • @NewYorkNixDa
      @NewYorkNixDa ปีที่แล้ว

      @@OneWheelStudio Youre just awesome 🙂Ive found out how to implement other animations, my only problem is: if i change the maxSpeed it causes into slower animationspeed. 😞

  • @sparky634
    @sparky634 3 ปีที่แล้ว +3

    my charecter will move but it will only move up or down even A and D make me go ,up and down
    and my jump does not work

    • @MTweedC4
      @MTweedC4 2 ปีที่แล้ว

      For the movement: Are you sure BOTH Vector3 GetCameraRight/Forward are set to .y?
      right.y = 0;
      forward.y = 0;

  • @guillaumemercier3536
    @guillaumemercier3536 ปีที่แล้ว

    I am looking to use the new input system to change weapon with the d-pad buttons. But everything I do don't work.

    • @OneWheelStudio
      @OneWheelStudio  ปีที่แล้ว

      Are the events getting invoked? Are any functions getting called?

  • @ivancarranza2473
    @ivancarranza2473 ปีที่แล้ว

    Hey,
    After watching some other videos on movement and rotation on a rigid body character this is probably the best and more to the point. Everything works good for me, the only question I have is ('cause i tried to research but couldn't find anywhere) around 14:20 where you copy paste the GetCameraForward function to the GetCameraRight and you replace the highlighted text from 'forward' to 'right' only in the highlighted text, how is that done? is there shortcut? i've tried Ctrl+F2 and other ways but I can't figure it out. Obviously no rush on this but I think for those like me that don't know would be a great help. Thanks again for this video.

    • @OneWheelStudio
      @OneWheelStudio  ปีที่แล้ว

      Glad the video was useful! To rename variables I generally use CTRL + R +R ( press R twice). I believe pressing F2 also works.

  • @masterpirates1497
    @masterpirates1497 ปีที่แล้ว

    Thank you for such an impressive material and explanation! But I had a problem, even two, 1 this character just flies away although the collider and rigidbody are installed and configured exactly like you have, 2 moment is that the animations are not played and the character is in place in the idle pose. What could be the reason? These artifacts?

    • @OneWheelStudio
      @OneWheelStudio  ปีที่แล้ว

      Does this happen when jumping? There was an error in the code that I pointed out via on screen text. This has caused issues for other folks.

    • @OneWheelStudio
      @OneWheelStudio  ปีที่แล้ว

      As for the animation, sounds like the animation parameter is not getting set correctly? Are there any errors in the console?

  • @nayansinha7216
    @nayansinha7216 2 ปีที่แล้ว

    Very good video explained everything nicely

  • @kozmobotgames
    @kozmobotgames 11 หลายเดือนก่อน

    How can I make my player jump, please reply!!

    • @OneWheelStudio
      @OneWheelStudio  11 หลายเดือนก่อน +1

      Sorry, been busy. Check the comments if you haven't. Lots of folks have had jumping issues, and I'd guess there's a good chance you issue is mentioned.

  • @Magma-uw7yo
    @Magma-uw7yo 2 ปีที่แล้ว

    I ve got somme problems I want to fix, First, the cam go to right when I moove the mouse to the left and left for right, how can I fix that ? Secondly I want to block my camera to only the "front view" like fps with just one view behind him. When I turn, the camera turn too fast so we can't see where we watch

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      The left/right issue can be fixed by inverting the controls or by adding a negative sign to the horizontal inputs.
      As for the second issue, sounds like you want a different aim algorithm - I made a video covering the basics of the aim options. th-cam.com/video/E1s5HWQyyxg/w-d-xo.html

  • @threydrey328
    @threydrey328 2 ปีที่แล้ว

    What is the point of the keyboard movement if you can't walk. If you play keyboard you will only be able to run. Where is the simple shift run?

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      You would need to add that functionality. My first thought to do that would be to use the shift button to toggle the max speed. Shouldn't be too hard to add in.

  • @Endless_Existence
    @Endless_Existence 2 ปีที่แล้ว +1

    Hello thanks , Nice tutorial.
    But I am confused. How to walk ? I mean my character is always running........ How to walk ? I mean how to differentiate between run and walk? Sorry if i m asking something silly.................

  • @Hassanali-jr4yb
    @Hassanali-jr4yb 2 ปีที่แล้ว

    First of all thanks for such an amazing content, But I am really confused as there are 4 ways to use with new input system
    like you said in your first video about new input system. As the best ways are only 2 through Messages or by using Unity Events. But in this video your not using Invoke Using Unity Events?

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      My favorite method is to generate a C# class and using C# action/events. That's the approach that I've used here. It's a work flow I'm comfortable with - but at the end of the day use whatever method works best for you.

    • @Hassanali-jr4yb
      @Hassanali-jr4yb 2 ปีที่แล้ว +1

      @@OneWheelStudio thanks

  • @patek2385
    @patek2385 ปีที่แล้ว

    How can I initiate Jump action? It doesnt do anything when I press spacebar. Also there seems to be a problem with the gravity script. My player doesn't fall down, it just moves in the same plane.

    • @OneWheelStudio
      @OneWheelStudio  ปีที่แล้ว

      The issue with the gravity is at 16:31. I made a mistake in the code and put an text based message on the screen pointing it out. I should have made it more obvious. Oops.

    • @patek2385
      @patek2385 ปีที่แล้ว +1

      @@OneWheelStudio I'm gonna check it today, thank you for pointing this out

  • @Ericzxi
    @Ericzxi ปีที่แล้ว +1

    I'm getting an nullReferenceException for "forceDirection += move.ReadValue().x * GetCameraRight(playerCam) * movementForce;"

    • @AllMyBeatz
      @AllMyBeatz ปีที่แล้ว +1

      Me too stuck here :( I assigned the camera quadruple checked the tutorial and don't know what happened

    • @oldmelancholic961
      @oldmelancholic961 10 หลายเดือนก่อน

      ****If you have written the codes that need to be written to the ondisable function into onenable, you are likely to receive this error.****

  • @sakrefunholy
    @sakrefunholy 2 ปีที่แล้ว

    I have a different question. If I wanted to use a 2d directional animator (for example to make the character able to strafe to the sides with animations) then how would I use that with the new input system?

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      I'm not sure it's any different with the new input system. Maybe I'm wrong. So here's my first thought on the problem:
      You would need to separate out the side to side velocity and the forward/backward velocity - these would need to be relative to the camera's direction. You could look up "vector projections" to project the character velocity onto the camera's direction to get the velocity in the s/s or f/b direction.
      From there you could then send the magnitude (with sign) of each of those velocity to the animator as parameters.

  • @bhautikranpara7664
    @bhautikranpara7664 3 ปีที่แล้ว

    Hello sir, Can we make videos on 3rd person shooter with different type of gun using Animation rigging ?

  • @conservativestrawman9837
    @conservativestrawman9837 2 ปีที่แล้ว

    No composite options when I right click the action. Send halp.

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว +1

      In the action properties set "action type" to "value" and the control type to "vector 2"

  • @johnpotesta3744
    @johnpotesta3744 ปีที่แล้ว

    Hello, thanks for the video! I got through it but am having issues with gameplay where the camera is very choppy.... I think it is within the animator somewhere since I turned it off and then gameplay looked normal and not choppy/stuttering. any suggestions?

    • @OneWheelStudio
      @OneWheelStudio  ปีที่แล้ว

      I'm not really sure what that's about. I know a few other folks have commented about it, but never saw it on my end. It does seem weird that the animator would effect the camera. Might be worth playing with the camera target - the base object vs. the animated object?

    • @itsmillertyme
      @itsmillertyme ปีที่แล้ว +1

      @@OneWheelStudio Turning on Interpolate on the Rigidbody fixed the issue for me :)

  • @joekraphel5113
    @joekraphel5113 2 ปีที่แล้ว

    Question - I have terrain that is uneven and when my character runs/walks across it hills, it remain in air and gravity isn't applied. Might the rigidbody mass be too low? Something I need to add in code?

    • @joekraphel5113
      @joekraphel5113 2 ปีที่แล้ว

      Oh, and gravity is already enabled on the rigidbody

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว +1

      At 16:31 there is an error and on screen text to point it out. For lots of folks this has been the cause of jump issues. If that's not the issue you're more than welcome to jump over to the OWS discord server and we can try and figure out a solution.

  • @018FLP
    @018FLP 2 ปีที่แล้ว

    I'm commenting before following the video, but just by passing my eyes on it, it seens that this is the perfect tutorial for everything i planned to use, so thanks a lot in advance

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว +1

      I hope it lives up to expectations 😉

    • @018FLP
      @018FLP 2 ปีที่แล้ว +1

      ​@@OneWheelStudio Yeah, there are a some tweaks to make (e.g., my move is 2d simple directional, with backwards and sideways specifics animations), but in general a very very solid tutorial, i learned a lot! =DD

  • @oliverhuber4578
    @oliverhuber4578 ปีที่แล้ว

    How would you add a jump animation to this setup?

    • @OneWheelStudio
      @OneWheelStudio  ปีที่แล้ว +1

      There would be a lot of steps to do that! I would suggest researching "triggers" in the animator and "avatar masks." The trigger will let you transition to a new animation - you will need to add a jump animation. Then you can use an avatar mask to have the jump animation only apply to the legs - this allows the arms to still hold a weapon or what ever.

  • @mdaltaf5020
    @mdaltaf5020 2 ปีที่แล้ว

    Can you please make a third person tutorial for bolt 🙂

  • @Bluhbear
    @Bluhbear 3 ปีที่แล้ว +1

    Having to type to specify the whole joystick and the 2D vector composite not being available from the plus sign are both because you hadn't set the Move action to be a Vector2, rather than a Button.
    This is a great tutorial, though. I've really been struggling with the coding aspect of movement lately.
    I'm having two issues with this, though:
    1. The Jump Raycast isn't working for me. I might have to mess around with the positioning, but I'm putting that off for now, because...
    2. Something about this code has made my player entirely immune to gravity. If I walk off a cliff, they just float, and can walk on air. I am very confused by this one. 🤷‍♂️
    (Both issues are solved! See replies.)

    • @Bluhbear
      @Bluhbear 3 ปีที่แล้ว +1

      Ok, I don't know why, but if I comment out the line:
      if (rb.velocity.y < 0) rb.velocity += Vector3.down * Physics.gravity.y * Time.fixedDeltaTime;
      it stops floating. This shouldn't do anything unless the fallspeed is already negative, though, so I have no idea what's going on.

    • @OneWheelStudio
      @OneWheelStudio  3 ปีที่แล้ว +2

      For issue #2 I made a sign error in the jump code. I added a written comment on screen and fixed it later in the video. You can also check out the linked code which should be correct.

    • @OneWheelStudio
      @OneWheelStudio  3 ปีที่แล้ว +1

      As for the first issue, raycasting can be a pain to debug. You can try adding a debug ray call to visualize where the ray it.

    • @Bluhbear
      @Bluhbear 3 ปีที่แล้ว +1

      @@OneWheelStudio ohhh.... I just missed that, somehow 😅
      Thanks for the quick replies!

    • @Bluhbear
      @Bluhbear 3 ปีที่แล้ว +1

      The issue with the raycast is that the origin position is based on the center of the player, rather than the bottom, so it either needed to be longer, or start from a lower position.

  • @Adamthegeek70
    @Adamthegeek70 2 ปีที่แล้ว

    I start this and my model changes to lay flat on his back. Any Ideas?

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      Is it possible the rigidbody constraints aren't set right?

    • @Adamthegeek70
      @Adamthegeek70 2 ปีที่แล้ว

      @@OneWheelStudio I think youtube is deleting my comment. I think its an animation issue. with the animation I am using, I switched to mixamo and I am faring a little better though I lost jump in my rewrite. :D I doubt it is your code, that seems spot on.

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      @@Adamthegeek70 Mmmm. Yeah, animations stuff can be a bit tricky to debug. Pop over to the OWS discord if you continue to get stuck. It's fairly quiet but there's folks (myself included) who might be able to help.

  • @jroc6745
    @jroc6745 3 ปีที่แล้ว

    Thank you for your time. I have a problem. When I press play I can move in all directions and the animations work but when I press jump the character stays in the air.

    • @OneWheelStudio
      @OneWheelStudio  3 ปีที่แล้ว

      This happened to someone else who accidently added a "Character Controller" component. Any chance you did that?
      If not, something in one of the component is likely not set right. Feel free to jump over to the OWS discord - it's easier to help there. Add in some screenshots of the inspector for the player object.

    • @jroc6745
      @jroc6745 3 ปีที่แล้ว

      @@OneWheelStudio Thanks for the reply. I only added Rigidbody and CapsuleCollider like you did. Seems like there is no gravity as the chracter wont fall off a ledge either. Maybe I missed a part of the video that addressed this.

    • @OneWheelStudio
      @OneWheelStudio  3 ปีที่แล้ว

      Gravity should be turned on by default on the rigidbody. Check that.

    • @jroc6745
      @jroc6745 3 ปีที่แล้ว

      @@OneWheelStudio Yes "Use Gravity" on the Rigidbody is checked.

    • @OneWheelStudio
      @OneWheelStudio  3 ปีที่แล้ว

      Hmm. That’s weird. I would lift the character up so it would fall and start turning components off until you can figure out what is preventing it from falling.

  • @jmunozve
    @jmunozve ปีที่แล้ว

    Hi, congratulatión for your video, i Have a questión, I have an animatión of Jump, Where do i can write in the code the instruccion "_animplayerSetTrigger("Jump") ?

    • @jmunozve
      @jmunozve ปีที่แล้ว

      greeting, ready I made it

    • @aliceintini8900
      @aliceintini8900 4 หลายเดือนก่อน

      @@jmunozve Can you explain how you did that please?

  • @harryrithman1977
    @harryrithman1977 2 ปีที่แล้ว

    I need help when installed input system tools didn’t show up just scripts

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      Is there an error that is coming up? Sounds like maybe the code didn’t compile?

    • @harryrithman1977
      @harryrithman1977 2 ปีที่แล้ว

      I figured maybe there was something else I had to do

    • @harryrithman1977
      @harryrithman1977 2 ปีที่แล้ว

      Maybe there a different version

  • @Lexfinity
    @Lexfinity 3 ปีที่แล้ว

    Did you ever find out the difference in malemodel and female?

    • @OneWheelStudio
      @OneWheelStudio  3 ปีที่แล้ว

      No I didn't. To be honest, it definitely made me curious, but I didn't dig into it. Still seems odd to me.

  • @fongaming101
    @fongaming101 8 หลายเดือนก่อน +1

    I like

  • @phoenixdevelopment5485
    @phoenixdevelopment5485 2 ปีที่แล้ว

    I have checked and checked over my code but Unity keeps giving me an error saying ; expected. I have literally copied what you wrote and checked so many times =[

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว +1

      What error are you getting? What line is it coming from?
      Happy to help! You can slide over to the OWS discord - might be easier to find the cause (link in the description).

    • @phoenixdevelopment5485
      @phoenixdevelopment5485 2 ปีที่แล้ว

      @@OneWheelStudio Thank you for replying, I have joined the Discord. I found out that I had not integrated Visual Studio correctly with Unity and it was having difficulty accessing certain things. Thanks.

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว +2

      @@phoenixdevelopment5485 Glad you figured it out. Don't hesitate to reach out on the server. There's a few helpful folks there besides myself too.

    • @phoenixdevelopment5485
      @phoenixdevelopment5485 2 ปีที่แล้ว

      @@OneWheelStudio Yes got it working and feeling so happy! Thank you for having a legit good tutorial!

  • @princessoscar3089
    @princessoscar3089 2 ปีที่แล้ว

    HELP ME IT SAYS "THIRDPERSONACTIONSASSET CANNOT BE FOUND" and "RIGIDBODY cannot be found" I copied everything you did!

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      I’m not sure the exact issue. You can pop over to the OWS Discord and share you code - that’ll make it a lot easier to figure out.

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      There’s a discord invite in the video description.

  • @dmerrohull5635
    @dmerrohull5635 2 ปีที่แล้ว

    Can this be done without the camera orbitial

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      Yep, don't call the rotation function in update and it should work!

    • @dmerrohull5635
      @dmerrohull5635 2 ปีที่แล้ว +1

      @@OneWheelStudio the fixed update

  • @daberechiukoha-kalu356
    @daberechiukoha-kalu356 2 ปีที่แล้ว +1

    THANK UUU

  • @epicjoshy1485
    @epicjoshy1485 2 ปีที่แล้ว

    Hi! This tutorial was helpful for moving the character with the new input system. But, my issue is that my character flies and stays in the air when it tries to go down a slope. i dont know if it has something to do with the raycast in IsGrounded. And i dont have any animations set up. just a capsule. Does anyone know how to fix this? that would be great!

    • @hasthenpc
      @hasthenpc 2 ปีที่แล้ว

      have you added a rigidbody to the object? if you're using a capsule collider seems you'd be using rb.. if not, you'd have to have gravity applied to your object

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      Did you catch the error at 16:31?

    • @epicjoshy1485
      @epicjoshy1485 2 ปีที่แล้ว

      @@OneWheelStudio I caught your error but it still doesn’t make the player fall or go down from slopes

    • @epicjoshy1485
      @epicjoshy1485 2 ปีที่แล้ว

      @@hasthenpc i did add a rigidbody and a capsule collider

    • @epicjoshy1485
      @epicjoshy1485 2 ปีที่แล้ว

      I tried looking up forums and different tutorials about slopes but they have different ways of coding it and some weren’t much help. I was watching the character in this tutorial step on and off the sidewalk and mine doesn’t do that. it just flies and it doesn’t know how to fall

  • @paulscott3083
    @paulscott3083 2 ปีที่แล้ว

    I added the code to stop spinning but still spins

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      I’m not sure I fully understand the problem. Feel free to jump on the OWS discord- it might be easier to help there.

  • @ripsy
    @ripsy 3 ปีที่แล้ว

    Input not working for me, character wont move. Any idea's ?

    • @OneWheelStudio
      @OneWheelStudio  3 ปีที่แล้ว

      Did you "Enable" the action or action map? Did you make the switch in Project Settings > Player > Input Handling to include the "new" input system? Those would be my first two guesses.

    • @ripsy
      @ripsy 3 ปีที่แล้ว

      @@OneWheelStudio Cannot find "Input Handling" inside Project Settings > Player

    • @OneWheelStudio
      @OneWheelStudio  3 ปีที่แล้ว

      It's in "other settings" roughly in the bottom third. Its also called "Active Input Handling" - oops.

    • @ripsy
      @ripsy 3 ปีที่แล้ว

      @@OneWheelStudio Thanks, its on new input. I have followed this video and watched it back looking for mistakes, but i got to around 20:00 in the tutorial when you press play and move around, but my character just wont move cant figure out what ive done wrong :(

    • @OneWheelStudio
      @OneWheelStudio  3 ปีที่แล้ว

      Any chance you forgot to save the Input Action Asset?

  •  ปีที่แล้ว

    I mean... where's the jump??

    • @OneWheelStudio
      @OneWheelStudio  ปีที่แล้ว

      It starts around 6:30 there are several pieces that have to be put together to make it work.

  • @wilwatts6298
    @wilwatts6298 2 ปีที่แล้ว

    Just starting out here and I'm not taking from the video but I would love if someone just posted the code so I could copy and paste it.

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      There is a link to GitHub in the description. All the code is posted there.

    • @wilwatts6298
      @wilwatts6298 2 ปีที่แล้ว +1

      @@OneWheelStudio Thank You.

  • @samchristian9149
    @samchristian9149 ปีที่แล้ว

    how could i stop moving during my attack animation?

    • @OneWheelStudio
      @OneWheelStudio  ปีที่แล้ว

      I'm not sure there is a super simple answer, but learning to use Unity's "StateMachineBehavior" is a really good start. It allows you a good way to know what's going on with an animation and run code accordingly. Animation triggers, unless something has changed, are often held up as a good (and much simpler) solution but they are buggy and non reliable.
      With the StateMachinceBehavior you could set the players velocity to zero while the particular animation plays. You might also be able to ignore player input while an attack animation plays.
      Here's the documentation: docs.unity3d.com/ScriptReference/StateMachineBehaviour.html

  • @harryrithman1977
    @harryrithman1977 2 ปีที่แล้ว

    I downloaded the 3d kit from stor and got bunch of errors

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      Are they render pipeline errors? I think the kit is designed for the built in render pipeline not URP or HDRP. the developer should be reasonably responsive to email.

    • @harryrithman1977
      @harryrithman1977 2 ปีที่แล้ว

      @@OneWheelStudio the one error that came up is not there but there is one still there that says something about player settings but I can’t find player settings I’m new to unity so I don’t know where anything is

    • @harryrithman1977
      @harryrithman1977 2 ปีที่แล้ว

      I wish I could put screenshot but don’t seem to be able to

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      You are welcome to jump over to the OWS discord (link in the description) it's easy to share a screenshot there.

    • @harryrithman1977
      @harryrithman1977 2 ปีที่แล้ว

      @@OneWheelStudio don’t have discord do you have unity forum account

  • @rdragon587
    @rdragon587 2 ปีที่แล้ว +1

    cool )

  • @Claudiopo_1
    @Claudiopo_1 3 ปีที่แล้ว

    well its works , but my character still move when i jump

    • @OneWheelStudio
      @OneWheelStudio  3 ปีที่แล้ว +1

      Moves as in moves up and doesn’t come down? If so there is a sign error with the jump code, there is an onscreen correction and the code is corrected later in the video.

    • @Claudiopo_1
      @Claudiopo_1 3 ปีที่แล้ว

      ​@@OneWheelStudio the jump works "fine" (Yes, I corrected that sign- sign ) but when i dont know how stop the rigidbody if I want it to stop as for example in anticipation of the jump, or for example for other things like attack and that while doing that action it does not move or rotate the rigidbody and when finalice these actions i can move again :/

    • @OneWheelStudio
      @OneWheelStudio  3 ปีที่แล้ว

      @@Claudiopo_1 If you want to stop velocity when you jump or attack you can set the rigidbodies velocity directly when each of those other events occurs. Is that what you're looking for?

    • @OneWheelStudio
      @OneWheelStudio  3 ปีที่แล้ว +1

      To stop the rigidbody you have a few options. You can set the velocity to zero. You can set isKinematic to false. Or use the constraints to prevent movement. You could also create booleans such as isAttacking - then check the value before doing any movement or such.

    • @Claudiopo_1
      @Claudiopo_1 3 ปีที่แล้ว

      @@OneWheelStudio well i used animation events in animation clips and have created two public voids for stop the rigidbody and enable rigidbody , this works "fine" but i dont know if is the best options.thank for you support

  • @ДаниилСтаматовПродажи
    @ДаниилСтаматовПродажи 2 ปีที่แล้ว

    Well, Its great idea, but my character still cant look at the direction, because velocity stays 0, thats strange. do you have any idea why?

    • @robbware_
      @robbware_ 2 ปีที่แล้ว

      This is happening to me as well. It sometimes update the velocity, but it's not frequent nor does it follow a specific pattern. Through the rigidbody's info tab I can always see the velocity at 0.

    • @robbware_
      @robbware_ 2 ปีที่แล้ว +1

      I figured it out (that's what we get for not seeing the whole video..) - the animator component might be interfering with this. You have to make sure Root Motion is unchecked.

  • @lucasradioativo
    @lucasradioativo ปีที่แล้ว

    make for mobile

  • @conservativestrawman9837
    @conservativestrawman9837 2 ปีที่แล้ว

    character wont move, my ThirdPersonController script is identical to yours, is there a previous video for this project? I really don't get why people make several videos and about 1 subject yet don't point it out so I do all of this and then nothing happens. I have rewatched your video 3 times and everything is identical (from what was done in THIS video) so I imagine I am right and you have another video not mentioned in this one that also contains pertinent information about the subject in this particular video.
    Edit: I noticed the camera wasn't chosen in my script after I placed it on the character in my scene, and then it worked like a charm for anyone that had the same issue. My apologies, I guess I spaced on the part when you mentioned to do that. This is extremely frustrating to grasp, but I am not giving up. Thank you for everything.

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว +1

      There isn’t an additional video. Do you know if the inputs are working? Are the movement functions getting called when you press buttons?

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว +1

      Also feel free to drop by the OWS discord - it’s often easier to debug there.

    • @conservativestrawman9837
      @conservativestrawman9837 2 ปีที่แล้ว

      @@OneWheelStudio no i made a mistake its functioning now, sorry for the frustration, my apologies. And good to know! Thank you so much.
      Also, just want you to know this is the first vid I have come across that has let me successfully code with the newer Input System. I have found many videos that throw a bunch of the logic into update(), yours is the first I have found that seems to have more efficient logic. Thank you again from a total noob. lol

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว +1

      @@conservativestrawman9837 I'm glad its useful. It's not a simple video, but I do my best to keep things as clear and concise as possible ;)

  • @ifladog
    @ifladog 2 ปีที่แล้ว

    There is no imput action for me

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      As in you can't create a new input action? If so, sound like you need to import the "new" input system via the package manager.
      If the input action is not available in your controller script, double check that the code generation is turned on and that the input asset is saved or auto-save is toggled on.

    • @ifladog
      @ifladog 2 ปีที่แล้ว +1

      @@OneWheelStudiowas missing the input system package, thanks

    • @ifladog
      @ifladog 2 ปีที่แล้ว

      @@OneWheelStudio now i have a problem. The name "GetCameraRight" and "GetCameraForward" does not esxist, I also hava a problem with "The name 'GetCameraForward' does not exist in the current context". Do you know any way to fix this?

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      @@ifladog Those are all functions created in the video. th-cam.com/video/WIl6ysorTE0/w-d-xo.html

  • @oldmelancholic961
    @oldmelancholic961 10 หลายเดือนก่อน

    NullReferenceException: Object reference not set to an instance of an object
    ThirdPersonController.FixedUpdate () (at Assets/ThirdPersonController.cs:44) ***line 44= forceDirection += move.ReadValue().x * GetCameraRight(playerCamera) * movementForce;
    ****If you have written the codes that need to be written to the ondisable function into onenable, you are likely to receive this error.****

  • @ADevGaming
    @ADevGaming 2 ปีที่แล้ว

    Jump use keyboard dont working 🙏

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      If you check back when that code is added their is a sign error - I made a visual note and changed the code later but should have made it more obvious.

  • @firewolf11567
    @firewolf11567 2 ปีที่แล้ว

    Bonk

  • @HuddledEragon
    @HuddledEragon 2 ปีที่แล้ว

    34:03

    • @OneWheelStudio
      @OneWheelStudio  2 ปีที่แล้ว

      Did you have a question?

    • @HuddledEragon
      @HuddledEragon 2 ปีที่แล้ว +1

      @@OneWheelStudio No I don't have a question it's just a reminder to carry on for later.

  • @kperezapolla
    @kperezapolla 2 ปีที่แล้ว +1

    Great tutorial, im habing some issues but is because me i dont understand at all your code!

  • @johnshields_
    @johnshields_ 2 ปีที่แล้ว +2

    Best Player controller tutorial ever! no more spider web animators!

  • @MrTaziz
    @MrTaziz 3 ปีที่แล้ว +4

    Hey really liked this kind of style of video, very informative, learned a lot. But when you were explaining the movement physics was a bit confusing, maybe do a separate video where you explain this better ?

    • @OneWheelStudio
      @OneWheelStudio  3 ปีที่แล้ว +3

      That’s a fair critique! My day job is a physics teacher so easy to gloss over bits when I’m focused on the code. Was there something in particular about the physics that was unclear? Or all of it? 😛

    • @MrTaziz
      @MrTaziz 3 ปีที่แล้ว +2

      @@OneWheelStudio This video was was about unity new Input System and boy it delivered. I think it's more a request/suggestion than a critique :D yeah to me physics and math is unity is the bigger hurtle. I do understand them when I get explained, but figure this out by my self or where to start is what melts my brain. Cheers

    • @OneWheelStudio
      @OneWheelStudio  3 ปีที่แล้ว +2

      Totally get that. Always happy to try and answer questions - pop over to the OWS discord any time I can help.

  • @mikelangford5964
    @mikelangford5964 9 หลายเดือนก่อน +2

    This was a good start. The code needs some modifications to handle any sort of hill or stairs, but not a bad intro.

  • @zparklyztars
    @zparklyztars 3 ปีที่แล้ว +3

    I love this style of videos, keep up the great work! It feels like a one on one tutoring session and that makes walking through the codes and around Unity all that much easier! Thank you for making great videos!

  • @lueur_glow_02
    @lueur_glow_02 2 ปีที่แล้ว +1

    Can you please make a video how this work's in with mobile input. Please.

  • @UKRmusiclyrics
    @UKRmusiclyrics 2 หลายเดือนก่อน

    I have some weird issue. The code is the same, and the actions are as well. I checked; the camera is attached, and there are no errors. But my character moves only if I press A and D, and it moves diagonally (kinda). I have no clue why W and S don't work. I will try to fix this, but it seems like I wasted 2 hours on this. In the end, I might just go back to the old version of moving the character because I have no idea at all what the issue might be.

  • @lumzalum8863
    @lumzalum8863 2 ปีที่แล้ว +2

    Thank you for bit on Input System + Cinemachine, but I'm getting jittery movement with the camera now as compared with when I used Mouse X/Y

    • @Shir0dev_
      @Shir0dev_ 2 ปีที่แล้ว +2

      Idk if youre still having this problem but using interpolate on the rigidbody fixed this issue for me

    • @SacWebDeveloper
      @SacWebDeveloper 8 หลายเดือนก่อน

      Interpolate + continuous

  • @nosh247
    @nosh247 3 ปีที่แล้ว +3

    Excellent tutorial! thank you!

  • @X7373Z
    @X7373Z 3 ปีที่แล้ว +2

    Is it just me or does the video at 38:40 start doing a weird skip/stutter for the rest of that segment? (up to ~39:07 )

    • @OneWheelStudio
      @OneWheelStudio  3 ปีที่แล้ว

      Hmm. I don’t see it happening. I’d definitely be interested if others see seeing it too.

    • @javiebeats759
      @javiebeats759 3 ปีที่แล้ว +2

      @@OneWheelStudio it does.

  • @EricWilliamsCG
    @EricWilliamsCG 2 ปีที่แล้ว +1

    24:37 You can find the animation inside the objects. So click drop down for the object, fbx or whatever it is, and drag the animation from inside of it into the inspector. Great tutorial!

  • @KotobaProject-KOTOBA
    @KotobaProject-KOTOBA ปีที่แล้ว +1

    HEY! Thanks for the Tutorial!
    i had an issue with the character, one that made her fly as soon i started the game. It wasnt the code error in 16:32 and it wasn't a capsule collider issue, i find out that this is a problem with the Animator component... to fix this, just disable Apply Root Motion. Hope someone find this useful, thanks for the video

  • @joefacenda3034
    @joefacenda3034 2 ปีที่แล้ว +1

    Thank you for your clear explanation of why we normalize the camera look vectors. I finally understand.

  • @sahpdude
    @sahpdude 6 หลายเดือนก่อน

    you cannot drag those animations because they have meshes included those are full animation files with mesh pieces included
    if you opened the animation that you said "I can't drag these into the animation slots" and you selected the animation file specifically then dragged it into the blend slot it would work.
    I had the same question I was like why can you not drag this into the blend state but that is because that is the entire mesh and not just the animation data