Fixed, Spring, Hinge, Character & Configurable Joint explained - Unity Tutorial

Поделиться
HTML-код
  • Опубликовано: 21 июл 2018
  • Timecodes:
    0:26 Scene Setup
    1:15 Fixed Joint
    3:33 Spring Joint
    6:54 Hinge Joint
    9:52 Character Joint
    11:55 Configurable Joint
    This is a tutorial for unity, that I wanted to make a long time ago. I would really wish that there was a tutorial out there, when I first used joints. And to be honest I am not quite sure, why sometimes the physics have a litte bit off. But nevertheless I present you these joints.

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

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

    Wow, having this joint customization makes Unity extremely powerful! This is AWESOME. Thanks for the tutorial!!

  • @luuklsl
    @luuklsl 3 года назад +11

    Thank you, I was struggling so hard with getting a configurable joint to work as I wanted. You explained it so much better than the Unity documentation. Showing off with a good example! Thank you so much!

  • @Caden_Burleson
    @Caden_Burleson 4 года назад +3

    Thank you kind sir! I'm getting into active rag-dolls and this really helped clear up a lot of frustration with what the differences were between all of the different joints.

  • @AbdelJN
    @AbdelJN 2 года назад

    Yo this video is great! So many dev's speak at length unnecessarily to where I have to 1.5x the video. Not yours! Clear and to the point. Thanks so much!

  • @benzen2346
    @benzen2346 4 года назад +1

    great video! I caught a really good second lesson and that is your rapid prototyping technique on a test project. This will save me a ton of time!

  • @SuperheroCoding
    @SuperheroCoding 4 года назад +1

    Thanks so much! What a great rundown of all the joint types. Very useful stuff - you've got a new sub!

  • @TwentysixPM
    @TwentysixPM 5 лет назад +30

    Thank you! You really helped me understand configurable joints.

    • @battosaijenkins946
      @battosaijenkins946 4 года назад +2

      @DitzelGames, Hi there I may be couple years too late but @2:05 you never mentioned that you need to press play to move the fixed joint. Otherwise they don't move together, my question is can you move those joints when NOT pressing play? In other words during the regular scene? Thx in advance.

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

    thank you so much! I'm just learning physics in unity so this is incredibly helpful

  • @ChaosCain4
    @ChaosCain4 4 года назад +2

    Thank you so much, it really made them a lot clearer!

  • @HIN30N
    @HIN30N 4 года назад

    Exactly what I was looking for! Wow thanks.

  • @oc9438
    @oc9438 5 лет назад

    just what I needed, thank you

  • @drewmileham202
    @drewmileham202 4 года назад

    One of the best Unity tuts ive seen. Thanks

  • @PepsiFruit
    @PepsiFruit 4 года назад +49

    "Heres the time codes except you can press them"
    Setup 0:26
    Fixed joint 1:15
    Spring joint 3:33
    Hinge joint 6:54
    Character joint 9:52
    Configurable joint 11:55

  • @atom_zero5413
    @atom_zero5413 3 года назад +3

    Thank you so much for the video! One tip, if i may: i found out that if you "test" by doing an animation, it's way easier to test any interaction (i.e. animate the FreeCube), instead of moving it in Play Mode. Cheers!

  • @interpro
    @interpro 4 года назад +1

    Awesome! Thanks for the great video!

  • @leonardofraga5130
    @leonardofraga5130 3 года назад +10

    Thank you man. 2 things though.
    You should definitely enable gizmos. It's way easier to understand what's happening.
    And at the beginning where you tried to collide one box into the other to break the joint. In that case, the joint break force wasn't the problem. Unity actually didn't detect any collider at all. To prevent that, just change your Rigidbody Collision detection to "Continuous" instead of "Discrete".

  • @crump05
    @crump05 3 года назад

    thanks for awesome tutorials

  • @Oxmond
    @Oxmond 4 года назад +1

    Cool! Great tutorial! 👍🤓

  • @RiHezBestSmiteMontages
    @RiHezBestSmiteMontages 3 года назад

    thanks exactly what i was looking for

  • @Esbenellocos
    @Esbenellocos 5 лет назад +1

    Nice tutorial, thanks mate

  • @nitinjosephv
    @nitinjosephv 5 лет назад +2

    Good Video Dude! Thanks!

  • @singletonpattern4797
    @singletonpattern4797 5 лет назад +1

    Thank you mery much ,good tutorial .

  • @TheoParis
    @TheoParis 4 года назад

    Thanks
    This is very helpful!!

  • @GameMakerGuy
    @GameMakerGuy 2 месяца назад

    thank you, i was kinda wanting to make a ragdooll without simplified joints, and the hinged joint should work

  • @juhohyv8227
    @juhohyv8227 4 года назад

    thank you and have a nice day :)

  • @zbarba
    @zbarba 2 года назад +6

    imagine rigging a chatacter with these joints OwO

  • @SoaringSimulator
    @SoaringSimulator 3 года назад

    The 3DBuzz physics tutorial was awesome. But I can't find it anymore. Thanks for sharing!

  • @frankbraker
    @frankbraker 4 года назад

    Liked. Saved. Subbed. Commented!

  • @waverider1039
    @waverider1039 2 года назад

    Thank you a lot for this video.

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

    works, chock-full thanks!

  • @Apock1239
    @Apock1239 3 года назад

    Your voice is adorable and your video is informative, perfect. Thanks for putting this together!

  • @escueladeagentescriogralpe1237

    Worked, thx

  • @MattStuttardParker1
    @MattStuttardParker1 3 года назад

    super helpful :)

  • @aadarshsinghbhandari3233
    @aadarshsinghbhandari3233 2 года назад

    Nice video sir 👏👏👍❤️
    Love from India❤️❤️

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

    Awesome!

  • @lojain7707
    @lojain7707 4 года назад +1

    شكراً جزيلاً : )

  • @paulrobinson5490
    @paulrobinson5490 5 лет назад +5

    Nice tutorial again. I am new to game dev and was wondering if you could do a tutorial based on a mobile multi level game, explaining setting up of where the touch controller screen goes and a bit of explanation about correct use of 'game manager'. Is it possible to have the main character teleport into the level start and teleport out at the end of each level. Any help on these matters would be amazing, thanks, Paul

    • @DitzelGames
      @DitzelGames  5 лет назад +3

      Yes, I will consider this.

    • @paulrobinson5490
      @paulrobinson5490 5 лет назад +1

      You are the man. Next time I am paid, I am going to become a patreon on your site because for one, your tutorials are amazing, and two, at least you reply to people, nice. Thanks, Paul

  • @Eirenband
    @Eirenband 3 года назад

    excellent

  • @uRealReels
    @uRealReels 3 года назад +1

    Cool video... but how did you get the objects to move during simulation [play]?

  • @jmun3688
    @jmun3688 2 года назад

    Thanks!

  • @wildlonewolf445
    @wildlonewolf445 3 года назад

    thank you

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

    Goat

  • @katifurkan
    @katifurkan 3 года назад

    good video

  • @Kinosei30
    @Kinosei30 3 года назад +1

    I would like to add a hinge joint on an object that will be rotating with another larger object (basically a Ferris Wheel), but the hinge joint is too loose, it starts spinning like crazy at some point, no friction at all. Raising the mass or angular drag of the rigidbody does nothing, and raising the drag makes it stiffer but also feels much more resistance to the air. Do you know anyway of making it less loose?

  • @Necronomicron8
    @Necronomicron8 5 лет назад +4

    16:30 Shouldn't you have changed Rotation Drive Mode to Slerp as well? You basically just disabled springs here.

  • @Aidendenden233
    @Aidendenden233 3 года назад

    THX!

  • @goktugozleyen9766
    @goktugozleyen9766 2 года назад

    Hello there nice video nice explain. I have a question. How can i get the thumbnail physic i must to do that but i cant find source. Shortly, i am developing hyper-casual games. And i stack boxes to my pallet truck. If i swerving my character to right, boxes are smoothly curved to left. How can i do that ?

  • @gendalfgray7889
    @gendalfgray7889 5 лет назад

    Hellow, nice tutorial!
    But can you explain how ancor axis in configurable joint works? I suppose it needs for turning limit area.
    I'm making body with 2 limbs attached to it. And those limbs must have assimetrical angle limits on 2 direction.
    1) how rotate areas with this axis? Only x angle axis have min max setting.
    2) also areas on both limbs looking in one direction, but i need them to be mirrored. How to mirror them?
    I tried to change axis values and areas moved in weird way.
    May be i should use several hinge joints, but i think it will be harder to script.
    If so, i still want to know how axis work.

  • @dancehall1931
    @dancehall1931 4 года назад

    Newbie here. Would a spring joint approach make sense for trying to create a pole vaulting mechanic? Or what would be a good approach for creating pole vaulting?

  • @arnaudb4357
    @arnaudb4357 5 лет назад

    Nice tutorial thanks! what kind of joint can be rigged with more than 1 other objets?

    • @DitzelGames
      @DitzelGames  5 лет назад

      You can add more than one joint to a rigidbody to archive this.

    • @arnaudb4357
      @arnaudb4357 5 лет назад

      @@DitzelGames i tried to link a tank track with all types of joints but nithing Happens

  • @wn9521
    @wn9521 5 лет назад +7

    how would I attach my character(which has a fixed joint) to a object like a cube through script? for instance I want to have a interaction script on the cube I want to pick up and have a interaction radius of about 0.4 so that when the character enters the interaction zone the fixed joint automatically enables between the two objects and he can move around with it

    • @nimbona4
      @nimbona4 4 года назад

      Hi, did you manage to solve this? I'm facing the sam problem :)

    • @ihavecreatism9776
      @ihavecreatism9776 4 года назад +1

      There is a big problem in your idea. The player is going to grab things, that means he is responsible for the interaction script. Here is the solution:
      The player needs a fixed Joint in order for this to work.
      FixedJoint fixedJoint = GetComponent();
      fixedJoint.connectedBody = new Rigidbody(); //replace new Rigidbody() with the target rigidbody.
      This is just for the logic of setting the Rigidbody of a joint. You still need to find the Rigidbody somehow?
      If you need more information, I'm going to reply in this thread.

  • @smd1507
    @smd1507 4 года назад

    Hey, i know this is pretty old already. If I wanted a kunai or let's say a karambit to spin around a finger by gravity applied in VR like on a springjoint, which one would i choose? I can't seem to get it to work haha. Still pretty informative video. Thank you very much!

  • @J3R3MI6
    @J3R3MI6 3 года назад +1

    Excellent tutorial! Do you know how to strengthen a fixed joint?

    • @aaaaaaaa9478
      @aaaaaaaa9478 3 года назад +1

      The break and torque value?

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

    thx

  • @user-uj7go3mh8u
    @user-uj7go3mh8u Год назад

    10/10

  • @Vlad-Ra
    @Vlad-Ra 3 года назад

    Thx m8s

  • @lucutes2936
    @lucutes2936 2 месяца назад

    thxxx

  • @fortspartahq3767
    @fortspartahq3767 Месяц назад

    Could this method be used to make fishing mechanisms?

  • @openingchain328
    @openingchain328 2 года назад

    It's like I'm learning from Jens Bergensten

  • @storm5009
    @storm5009 5 лет назад +1

    Please make another tutorial

  • @trgamer3193
    @trgamer3193 5 лет назад

    Hello, why my hinge joint is looks like 2d ? i need to make like you but it looks circle, i need spherical hinge joint ? its only effected horizontal

  • @thenukdevendra1902
    @thenukdevendra1902 3 года назад

    Can u use a spring joint swining like a rope or a grappeling hook?

  • @TayakornRakwetpakorn
    @TayakornRakwetpakorn 4 года назад +15

    2:11 notice that he did that in play mode

    • @user-bh8gi3et9l
      @user-bh8gi3et9l 4 года назад

      hahaha . thank you dude , i was so exicted ... and not see it .. you solved me a lot of hours

  • @aaaaaaaa9478
    @aaaaaaaa9478 3 года назад

    Is there a way to give rigidbodys connected with fixed joint gravity mine just float

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

    If you add a 0:00 timestamp in the description youtube can make chapters for the video

  • @moonlightvi7534
    @moonlightvi7534 2 года назад

    gg bro

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

    What if i need to do the series connection like spring then how can I do the connections ?

  • @ponysonic
    @ponysonic 3 года назад

    anyone know why the physics no long applies any motion when you child the joint bones to the parent?

  • @random_precision_software
    @random_precision_software 5 лет назад

    How would connect a spring or hinged joint using c# script, ?

  • @vissenekku
    @vissenekku 2 года назад

    I'm struggling so much with this. The anchor point simply does not work correctly and I can't figure out why.
    Instead of anchoring where it's supposed to, it always goes to the center of mass instead. And it makes no sense.

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

    Reefer joints

  • @sergiopamplona1676
    @sergiopamplona1676 2 года назад

    hello, I have a problem with some fixedJoint and hingeJoint, could you help me how to solve them
    Thank you

  • @calvinterakaspeedr
    @calvinterakaspeedr 3 года назад

    anyone know how to make like a drawbridge. im trying to make a dive onto truck trailer thing that you can lower and rais a ramp using two butens

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

    Does anyone know how to controll joints of a asset by code? For custome movements for example

  • @nepicbutbad
    @nepicbutbad 4 года назад

    Thanks for helping you have a place in my games credits what do a name you ?

  • @GBart
    @GBart 2 года назад

    I can not get any hinge joint working, no matter how hard I try

  • @erenjeagerot
    @erenjeagerot 11 месяцев назад

    Representation of the fixed joint here is not entirely correct. You can use fixed joint in chains like hinge joint.
    You can try it on unity if you want. You will see that fixed joint can be used like hinge joint.

  • @danopris3056
    @danopris3056 5 лет назад

    slider joint ?

  • @floricide9669
    @floricide9669 4 года назад +1

    How do i assign the connected body through the script

    • @leaves_reality
      @leaves_reality 2 года назад

      if (!GetComponent().connectedBody)
      { GetComponent().connectedBody = GetComponentInParent(); }

  • @adirmugrabi
    @adirmugrabi 10 месяцев назад

    Scrap mechanic used this?

  • @demi-god5158
    @demi-god5158 4 года назад +1

    You tell us about them but you never show us how to roll in the first place dawg

  • @nojanskaitis
    @nojanskaitis 2 года назад

    If only you had put ( 0:00 intro ) at the top of that list of timestamps then this video would have chapters visible for anyone without going to the description.
    Yes, I'm lazy. What of it?

  • @bosstankproductions1304
    @bosstankproductions1304 11 месяцев назад

    Did he shave? Or if he’s lost weight too good work man idk 😂

  • @JaredQueiroz
    @JaredQueiroz Месяц назад

    Broh, how can not exist a single video on articulation body?? wtf

  • @bulervideo
    @bulervideo 3 года назад +1

    0:00 in thifff video, i cracked already lol

  • @drwarit1
    @drwarit1 3 года назад

    10:45 perfect for worms

  • @tutomovo8696
    @tutomovo8696 4 года назад

    Kann es sein das du Deutsch bist klingt ziemlich stark danach

  • @Assniffer
    @Assniffer 5 лет назад

    Can you guide me where should a beginner like me start from i don't know about any of these like why to use this ?

    • @devinhunter8609
      @devinhunter8609 4 года назад

      You should use Unity's learn website. It has a lot of different tutorials as well as a lot of documentation about different aspects of unity too.
      unity.com/learn

  • @user-vf7xv9xy9n
    @user-vf7xv9xy9n 3 года назад +3

    I feel so bad when I realize I have to use Configurable joint...

    • @abuUthmani
      @abuUthmani 3 года назад

      what are u using that for?

    • @user-vf7xv9xy9n
      @user-vf7xv9xy9n 3 года назад

      picking up objects like in Portal. I made it using rigid body already. I can share if you want

    • @abuUthmani
      @abuUthmani 3 года назад

      @@user-vf7xv9xy9n that would be great

    • @user-vf7xv9xy9n
      @user-vf7xv9xy9n 3 года назад

      // Follow after player hands
      public IEnumerator Follow(Transform playerHands)
      {
      while (held)
      {
      FollowPosition(playerHands);
      FollowRotation(playerHands);
      yield return null;
      }
      }
      // Follow player hands rotation
      private void FollowRotation(Transform playerHands)
      {
      // Rotating
      Vector3 desiredRotation = playerHands.eulerAngles;
      float xAngle = Vector3.SignedAngle(transform.up, playerHands.up, Vector3.right) / 90;
      float yAngle = Vector3.SignedAngle(transform.forward, playerHands.forward, Vector3.up) / 90;
      float zAngle = Vector3.SignedAngle(transform.up, playerHands.up, Vector3.forward) / 90;
      Vector3 direction = new Vector3(xAngle, yAngle, zAngle);
      rigidbody.angularVelocity += (direction * rotationForce) / rigidbody.mass;
      // Damping
      float dampingValue = 1 - (1 / (Mathf.Abs(yAngle) * rotationDamping + 1));
      float lookUpAngle = Vector3.Angle(playerHands.forward, Vector3.up) / 90;
      rigidbody.angularVelocity *= dampingValue * lookUpAngle;
      }
      // Follow player hand position
      private void FollowPosition(Transform playerHands)
      {
      // Moving
      Vector3 desiredPosition = playerHands.position;
      float distance = Vector3.Distance(desiredPosition, rigidbody.position);
      Vector3 direction = (desiredPosition - rigidbody.position).normalized;
      rigidbody.velocity += (direction * distance * movingForce) / rigidbody.mass;
      // Damping
      float dampingValue = 1 - (1 / (distance * movingDamping + 1));
      rigidbody.velocity *= dampingValue;
      }

    • @user-vf7xv9xy9n
      @user-vf7xv9xy9n 3 года назад

      @@abuUthmani That's not some professional programming here. But it works. It would be better if I used Quaternions for rotation, but I didn't learn them so I used my own method.

  • @andreamaiellaro5816
    @andreamaiellaro5816 5 лет назад

    So, for having a Punching Bag effect should I use Spring Joint??I think It makes sense....what do you think about ?

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

    This doesn't have all the joints though.

  • @halivudestevez2
    @halivudestevez2 13 часов назад

    so it's break, and not brake force!! OMG! :D

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

    3:19 Now Its completely broken 😭😭

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

    For anyone watching this, the explanation for the character joint is incorrect.
    The "Axis" parameter is the main twist axis (as documented in the Unity docs), not the swing axis.
    The whole section on the character joint is all wonky, as the axes are not correctly set, and what the author is saying does not match what's actually happening!

  • @anthonyder3685
    @anthonyder3685 5 лет назад +3

    Why is every video on spring joint 100% the same? I don't think anyone really understand them...

    • @DitzelGames
      @DitzelGames  5 лет назад +2

      I think I explained every detail of it - Like everyone else! Do you miss anything?

    • @anthonyder3685
      @anthonyder3685 5 лет назад +5

      DitzelGames well that is the problem all videos are 100% the same. If i watch one i have seen them all. I wanted som1 to explore implementing in a practical sense but nobody does this. Everyone just does the same demo video...

    • @twoshotted
      @twoshotted 5 лет назад +3

      because they're showcasing the same exact thing...

    • @DitzelGames
      @DitzelGames  5 лет назад

      ​@@anthonyder3685: See my rope physics video. There I used it to create a rope ruclips.net/user/edit?o=U&video_id=Cecp4a7FsTU
      I think there are so many videos out there that shows how to use it in a practical sense. They are simply not just labeled "Spring Joint in a practical use case"

    • @jacobbijani
      @jacobbijani 5 лет назад

      @@DitzelGames thats the youtube studio edit link FYI

  • @monkeyrobotsinc.9875
    @monkeyrobotsinc.9875 3 года назад +1

    Ok

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

    haters guna hate.

  • @acharya1574
    @acharya1574 3 года назад

    the cubes are not setting up!!

  • @moodeex3766
    @moodeex3766 2 года назад

    Good tutorial but kill the background music please.

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

    in our subculture it is DALLAS-ing (if you rember the old TV series)... Drink every ti they drink wNice tutorialskey