Smooth rigidbody first person movement in Unity

Поділитися
Вставка
  • Опубліковано 20 сер 2024
  • Today I will be showcasing my best first person movement controller that I have made so far. Feel free to ask questions in the description! Also, SUBSCRIBE, It would mean a lot.

КОМЕНТАРІ • 134

  • @lawrence9713
    @lawrence9713 Рік тому +94

    You sir have the ground work for a fantastic arena pvp shooter

  • @Goferf
    @Goferf Рік тому +43

    Imagine a quake like arena shooter with this controller. Greatest game of all time.

  • @COCONUTMONKE_
    @COCONUTMONKE_ Рік тому +21

    This is sick love the dash abillity

  • @ArythNeon
    @ArythNeon Рік тому +41

    I would love to see this in the Unity Assets Store as either a free or payable asset

    • @HostVR
      @HostVR Рік тому +8

      it aint even hard to make bruh

    • @nameofthename_
      @nameofthename_ Рік тому +17

      If you're gonna just use unity assets for your games you're not gonna get anywhere in game development.

    • @LukesOffline
      @LukesOffline Рік тому +27

      ​@@nameofthename_using assets like this as a base isn't a bad thing, stop acting prestigious

    • @brazilian-butt-lift-drizzy
      @brazilian-butt-lift-drizzy Рік тому

      The movement seems similar to Dave’s parkour movement tutorial

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

      @@nameofthename_ sometimes its hard to get it to feel just right

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

    this is my dream shooter. The Valve and quake side of me absolutely loves this.

  • @widestwade
    @widestwade Рік тому +3

    Baller music, and also this looks awesome.

  • @KillerKaneoss
    @KillerKaneoss 3 місяці тому

    what would make the dash feel a LOT better would be to increase fov when you dash and have some quick particles go past you

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

    dani aproved this because it has BEAN and physics

  • @urdadtai
    @urdadtai Рік тому +2

    This reminds me of the karlson player controller
    Ahh back when dani was alive
    RIP DANI GANG
    |
    \/

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

    Looks very nice, it reminds me of raot

  • @hzzk_
    @hzzk_ Рік тому +1

    nice, looks sick :)

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

    now thats pretty cool

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

    My brother, this look incredible. But how can we fully appreciate your work if the video is only 10 seconds ?

  • @obnobo
    @obnobo Рік тому +1

    put this up for sale bro. a lot of people would buy this, me included.

  • @6Abdellah9
    @6Abdellah9 Місяць тому

    proper sick just one question is the dash a inpulse or a velocity change or is a force applied over a couple seconds no idea what I'm talking about

  • @zxc686823
    @zxc686823 Рік тому +3

    this look good bro, and I would like to know did you make something like edge detection which can allow you to jump in a very low second away you leave the high ground? cause your demo seems able to do it

    • @condescendingsnail3722
      @condescendingsnail3722  Рік тому +8

      For ground detection, I have a racast with cayote time. To make cayote time, you save Time.time to a var (LastGroundedTime) when the player is grounded. Then check if that var plus the coyote time is greater then Time.time . Here is some pseudo code because that explanation was confusing.
      If (grounded) lastGroundedTime = Time.time;
      If (lastGroundedTime + 0.2f > Time.time)
      {Jump();}

    • @ArythNeon
      @ArythNeon Рік тому +4

      @@condescendingsnail3722 will u maybe make this into a asset on the asset store? I would pay for it like 20€

    • @sadscientisthououinkyouma1867
      @sadscientisthououinkyouma1867 11 місяців тому

      @@condescendingsnail3722 I know that is pseudo code, but 0.2f should probably be a variable. Just so you can test different implementations without needing to edit the script every time.

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

    this new minecraft update is cool

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

    I hate to say it but this is probably smoother than titanfall

  • @ketaminemike3308
    @ketaminemike3308 3 місяці тому

    That dash is so smooth man, how did u achieve that? everytime i try to make a smooth dash its just like a small teleport

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

    I think this would a cool idea for a travel game

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

      Could you explain what you mean by "travel game"?

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

      @@InFrontEntry i assume he means movement shooter sorta stuff

    • @InFrontEntry
      @InFrontEntry 2 місяці тому +1

      @@pinkaltercation alr

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

      @@InFrontEntry fr

    • @InFrontEntry
      @InFrontEntry 2 місяці тому +1

      @@pinkaltercation I like pancakes

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

    I loved the part where there was Minecraft gameplay
    (UA-cam thinks its Minecraft)

  • @dospiir8045
    @dospiir8045 Рік тому +4

    Can anyone tell me how he got these kind of maps? Like its not the usual 3D cubes is it?

    • @condescendingsnail3722
      @condescendingsnail3722  Рік тому +2

      I used probuilder to make the map. I also duplicated the default probuilder material to make different colors.

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

      @@condescendingsnail3722yeah using default unity builder should be a crime tbh

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

    guys look its utrakill behind the scenes

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

    Dope

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

    I still say Unity's old standard asset FPS rigidbody controller was one of the best

    • @Nikita-os6om
      @Nikita-os6om Рік тому +2

      I will say that it is best to write the movement yourself, because there it is quite sophisticated, but the camera control is implemented really well there. I use a slightly modified version of the camera script in all my projects

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

    Nice

  • @spike-the-legend_stl7685
    @spike-the-legend_stl7685 6 місяців тому

    Ghostrunner

  • @RemasterKing
    @RemasterKing 10 місяців тому

    BEAN

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

    cool

  • @kotchu
    @kotchu 7 місяців тому

    Sorry to hear that you stopped working on this project! Hope you've found something better :)
    Did you use the floating capsule technique for the rigidbody character or does the capsule directly collide with the ground?

    • @condescendingsnail3722
      @condescendingsnail3722  6 місяців тому

      It collides directly with the ground, I haven't yet tried floating capsules :)

  • @Danilocked
    @Danilocked Рік тому +3

    How did you make ledge detection affect movement? it seems at 0:02 the player touches the corner a bit but never stops, instead, it goes up a little bit to go through that platform.

    • @condescendingsnail3722
      @condescendingsnail3722  Рік тому +3

      I reduce the player collider's height when they are in the air. When the player lands the collider is set back to the normal height. since I'm using rigidbodies, if the collider goes through the floor when landing, unity physics will push the player up until the collider is no longer in the floor.

  • @nickc3657
    @nickc3657 Рік тому +1

    Putting a 15 second ad on an 11 second video is unconscionable my guy

    • @UrodCyka
      @UrodCyka Рік тому +4

      thats youtubes fault not his

  • @irondolphin1559
    @irondolphin1559 Рік тому +2

    dave

  • @BluePhoenixAlex
    @BluePhoenixAlex Рік тому +1

    Ive been trying to make something similar for a game concept, but unfortunately i suck at character controllers so it never feels right lol

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

    Ghost runner

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

    blud thinks he's spiderman

  • @user-dc2qk9hh3x
    @user-dc2qk9hh3x 5 місяців тому

    1. where is tutor ?
    2. where you learning this all "coding" thinks to do this ?
    3. do u use some vector project or somethink like this in this demo ?

  • @FireBlast2.0
    @FireBlast2.0 Рік тому +2

    I would love to look into this, is there any git hub repository?

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

    now add the airstrafing from source games

  • @ShredGrove
    @ShredGrove 11 місяців тому +1

    can you setuo a download link?

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

    do i see a BEAN?

  • @xgvt3957
    @xgvt3957 Рік тому +1

    can you showcase how u made it that smooth cause Iam not able to jumping and air movement feel good

    • @condescendingsnail3722
      @condescendingsnail3722  Рік тому +13

      To make the jumping smooth I reduce the colliders height while in the air (kind of like automatic crouch jumping), the result of this is that you almost always can make it over a jump if the camera makes it over the jump. For air movement you want low drag & low move speed, while for the ground movement you want the opposite: high drag & high move speed. hope this helps

    • @speednut1142
      @speednut1142 Рік тому +1

      @@condescendingsnail3722 I'm trying to make the same movement features. Please, share the code.

    • @starplatinum3305
      @starplatinum3305 7 місяців тому

      @@condescendingsnail3722 why do we need high drag and high speed at the same time when u just use drag = 1 and normal speed ? Im sorry if i sound rude

    • @condescendingsnail3722
      @condescendingsnail3722  7 місяців тому

      @@starplatinum3305 Because then the movement will be very slippery, which is good for air movement but not for ground movement.

    • @starplatinum3305
      @starplatinum3305 7 місяців тому +1

      @@condescendingsnail3722 damn thats smart, and you still have to add the physics mat to minimum the friction so the player wouldnt stuck in walls ?

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

    i just all over the place

  • @YEAHKINDA
    @YEAHKINDA Рік тому +1

    Ok so since nobody's asked....
    Tutorial?

  • @unpseudototalementnormal517
    @unpseudototalementnormal517 7 місяців тому

    Hello, i'm wondering how do you handle velocity, do you just add force until the max velocity in this direction is reached or is there something else ? thanks!

  • @harryag.
    @harryag. Рік тому

    PLEASE PLEASE PLEASE MAKE A TUTORIAL

  • @maz5-870
    @maz5-870 Рік тому

    how.

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

    Can I see some of the code for it? Not to use, just for personal study

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

    Are you going to be doing anything more with this in the future?

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

      I was working on a arena shooter:
      reddit.com/r/Unity3D/comments/14xzxka
      But the code got messy and hard to work with. I've moved on to other projects.

  • @slepiustudio
    @slepiustudio Рік тому +1

    How to make such a game?

    • @whysl
      @whysl 7 місяців тому

      first of all, you need to delete your pfp

  • @FrotimanGd
    @FrotimanGd 11 місяців тому

    please let me know how did u not hit the wall at 0:02 did u crouch or u have a
    mechanic for that ?

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

    add motion blur

  • @SkorpionYassine
    @SkorpionYassine 3 місяці тому

    Code?

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

    Bean

  • @itsdonix
    @itsdonix 6 місяців тому

    how did u implement vaulting?

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

    i always get stuttering making rigidbody movement, how do you ppl do that?

    • @condescendingsnail3722
      @condescendingsnail3722  Рік тому +1

      I think I know what you're talking about. If you have your camera parented to the rigidbody it will cause stuttering. Instead, you should put your camera in a camera holder gameobject and use a script to move the camera to the desired position. Also experiment with different interpolation modes on the rigidbody.

  • @ahmetedizbozkaya7580
    @ahmetedizbozkaya7580 6 місяців тому

    i cant fix the clipping over walls issue in rb movement what should i do?

    • @Hanyi_V
      @Hanyi_V 6 місяців тому

      if you Using Rigidbodys set Collision Detection to Continuous or Continuous Dynamic

    • @ahmetedizbozkaya7580
      @ahmetedizbozkaya7580 6 місяців тому

      @@Hanyi_V i tried not working

    • @Hanyi_V
      @Hanyi_V 6 місяців тому

      @@ahmetedizbozkaya7580 try setting Fixed TimeStep to something like 0.005 under the project settings

    • @ahmetedizbozkaya7580
      @ahmetedizbozkaya7580 6 місяців тому +1

      @@Hanyi_V thanks for information

  • @0xF81
    @0xF81 Рік тому

    Source code?

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

    i am developing similar movement, may i ask how did you make player to jump on ledges?

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

      When the player is in the air, the capsule collider shrinks into a sphere and gets moved to the camera's position. when the player lands the capsule collider moves back to the default position and scale (part of the collider will penetrate through the floor but unity's physics will push it back up). Think of crouch jumping in some source games but it automatically happens. Hope this helps!

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

      @@condescendingsnail3722 It did help and now it looks so smooth like yours, thank you!

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

    and then you build it and it acts completely different 😭😭

  • @JanWillemvanCappellen
    @JanWillemvanCappellen 8 місяців тому

    How did you handle rotation? I struggle with this on rigidbody rotation

    • @condescendingsnail3722
      @condescendingsnail3722  8 місяців тому +1

      I freeze all rotation on the rigidbody

    • @JanWillemvanCappellen
      @JanWillemvanCappellen 8 місяців тому

      @@condescendingsnail3722 so how do you handle looking around with the mouse? on the transform or something?

    • @condescendingsnail3722
      @condescendingsnail3722  8 місяців тому

      The camera is on a separate gameobject that can be rotated. I also teleport the gameobject instead of parenting it to the rigidbody to avoid stutters.@@JanWillemvanCappellen

    • @starplatinum3305
      @starplatinum3305 7 місяців тому

      ​@@condescendingsnail3722so that means the Rigidbody is in an empty obj and theres another visible capsule object following it ? And is the collider in the empty obj ?

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

    how do you make the launcher

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

      if (Input.GetButtonDown("button that u want")
      {
      rigidbody.AddForce(transform.forward * a float for how much force u want, ForceMode2D.Impulse)
      }

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

    How do you handle the grounding?

    • @condescendingsnail3722
      @condescendingsnail3722  Рік тому +2

      I used a raycast with coyote time, however I'm thinking about changing it to a spherecast.

    • @starplatinum3305
      @starplatinum3305 7 місяців тому

      ​@@condescendingsnail3722 how bout spherecastnonalloc ?

  • @jhovanni-li8rl
    @jhovanni-li8rl Рік тому

    Can this be done in free unity version?

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

    Can you show the script of type it cuz im making a game and i cant get the movement down

  • @د-ت
    @د-ت Рік тому

    gimme script

  • @Gelwart
    @Gelwart 11 місяців тому

    oh, you dont know what karlson is? its just a game...

    • @BL_Tortuga
      @BL_Tortuga 10 місяців тому

      That I'm working on currently the 20th most wishlisted game on steam so wishlist now b0ners -dani

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

    i want that script
    XD

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

      same, but it would be great to have it on the asset strore to either buy it or get it free, I would actually pay for it

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

      @@ArythNeon just follow 30 minute tutorial bruh

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

    *don't make a new project. don't make a new project. don't make a new project. don't make a new project.*

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

    Aot fps

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

    Itu game roblox

  • @STYM-wx9mt
    @STYM-wx9mt Рік тому

    I want this player movement, can you give me?

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

    release this game right now 😡😡😡😡😡😡