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

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ธ.ค. 2024

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

  • @PepsiFruit
    @PepsiFruit 5 ปีที่แล้ว +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

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

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

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

      you know combining simpler joints gives the same power but less annoying weirdness with 200 exposed fields giving different options..
      i think unity should strip down the joints and allow users to combine functionalities

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

    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!

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

    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!

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

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

  • @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.

  • @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

  • @leonardofraga5130
    @leonardofraga5130 4 ปีที่แล้ว +12

    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".

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

      @3:00 ish you mean. Thank you!

  • @Gooosek
    @Gooosek 28 วันที่ผ่านมา

    Amazing tutorial! Found out the exact thing that i needed :D Thank you!

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

    imagine rigging a chatacter with these joints OwO

  • @benzen2346
    @benzen2346 5 ปีที่แล้ว +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!

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

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

  • @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!

  • @Necronomicron8
    @Necronomicron8 5 ปีที่แล้ว +4

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

  • @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!

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

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

  • @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?

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

    Awesome! Thanks for the great video!

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

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

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

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

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

    thanks exactly what i was looking for

  • @HIN30N
    @HIN30N 4 ปีที่แล้ว

    Exactly what I was looking for! Wow thanks.

  • @blackjackveteran
    @blackjackveteran 4 ปีที่แล้ว

    thanks for awesome tutorials

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

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

  • @CosmicAlchemistt
    @CosmicAlchemistt 6 ปีที่แล้ว +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.

  • @frankbraker
    @frankbraker 4 ปีที่แล้ว

    Liked. Saved. Subbed. Commented!

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

    Cool! Great tutorial! 👍🤓

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

    Nice tutorial, thanks mate

  • @drewmileham202
    @drewmileham202 5 ปีที่แล้ว

    One of the best Unity tuts ive seen. Thanks

  • @TayakornRakwetpakorn
    @TayakornRakwetpakorn 5 ปีที่แล้ว +15

    2:11 notice that he did that in play mode

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

    Thank you mery much ,good tutorial .

  • @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 ?

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

    works, chock-full thanks!

  • @oc9438
    @oc9438 5 ปีที่แล้ว

    just what I needed, thank you

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

    Thank you a lot for this video.

  • @dancehall1931
    @dancehall1931 5 ปีที่แล้ว

    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?

  • @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?

  • @juhohyv8227
    @juhohyv8227 5 ปีที่แล้ว

    thank you and have a nice day :)

  • @Apock1239
    @Apock1239 4 ปีที่แล้ว

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

  • @TheoParis
    @TheoParis 4 ปีที่แล้ว

    Thanks
    This is very helpful!!

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

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

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

      The break and torque value?

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

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

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

    Could this method be used to make fishing mechanisms?

  • @Vladimir-V-Kondratyev
    @Vladimir-V-Kondratyev 4 ปีที่แล้ว

    Thx m8s

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

    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.

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

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

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

    Awesome!

  • @aaaaaaaa9478
    @aaaaaaaa9478 4 ปีที่แล้ว

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

  • @paulrobinson5490
    @paulrobinson5490 6 ปีที่แล้ว +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  6 ปีที่แล้ว +3

      Yes, I will consider this.

    • @paulrobinson5490
      @paulrobinson5490 6 ปีที่แล้ว +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

  • @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

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

    Worked, thx

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

    Goat

  • @thenukdevendra1902
    @thenukdevendra1902 4 ปีที่แล้ว

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

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

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

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

    How do i assign the connected body through the script

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

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

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

    excellent

  • @gendalfgray7889
    @gendalfgray7889 6 ปีที่แล้ว

    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.

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

    super helpful :)

  • @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!

  • @arnaudb4357
    @arnaudb4357 6 ปีที่แล้ว

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

    • @DitzelGames
      @DitzelGames  6 ปีที่แล้ว

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

    • @arnaudb4357
      @arnaudb4357 6 ปีที่แล้ว

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

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

    Thanks!

  • @wildlonewolf445
    @wildlonewolf445 4 ปีที่แล้ว

    thank you

  • @random_precision_software
    @random_precision_software 6 ปีที่แล้ว

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

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

    3:19 Now Its completely broken 😭😭

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

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

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

    Reefer joints

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

    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.

  • @katifurkan
    @katifurkan 4 ปีที่แล้ว

    good video

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

    THX!

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

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

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

    It's like I'm learning from Jens Bergensten

  • @calvinterakaspeedr
    @calvinterakaspeedr 4 ปีที่แล้ว

    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

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

    Please make another tutorial

  • @danopris3056
    @danopris3056 5 ปีที่แล้ว

    slider joint ?

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

    Scrap mechanic used this?

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

    This doesn't have all the joints though.

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

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

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

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

    • @anthonyder3685
      @anthonyder3685 6 ปีที่แล้ว +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 6 ปีที่แล้ว +3

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

    • @DitzelGames
      @DitzelGames  6 ปีที่แล้ว

      ​@@anthonyder3685: See my rope physics video. There I used it to create a rope th-cam.com/users/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 6 ปีที่แล้ว

      @@DitzelGames thats the youtube studio edit link FYI

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

    thx

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

    0:00 in thifff video, i cracked already lol

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

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

  • @АдисХоджаяров
    @АдисХоджаяров 3 ปีที่แล้ว +3

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

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

      what are u using that for?

    • @АдисХоджаяров
      @АдисХоджаяров 3 ปีที่แล้ว

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

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

      @@АдисХоджаяров that would be great

    • @АдисХоджаяров
      @АдисХоджаяров 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;
      }

    • @АдисХоджаяров
      @АдисХоджаяров 3 ปีที่แล้ว

      @@notrue4u 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.

  • @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 5 ปีที่แล้ว

      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

  • @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 ?

  • @nepicbutbad
    @nepicbutbad 4 ปีที่แล้ว

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

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

    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!

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

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

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

    thxxx

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

    10:45 perfect for worms

  • @demi-god5158
    @demi-god5158 4 ปีที่แล้ว +1

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

  • @tutomovo8696
    @tutomovo8696 4 ปีที่แล้ว

    Kann es sein das du Deutsch bist klingt ziemlich stark danach

  • @acharya1574
    @acharya1574 4 ปีที่แล้ว

    the cubes are not setting up!!

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

    gg bro

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

    weed joints ?

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

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

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

    Good tutorial but kill the background music please.

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

    haters guna hate.

  • @redmanone6963
    @redmanone6963 5 ปีที่แล้ว

    Дякую(Ukraine)

  • @monkeyrobotsinc.9875
    @monkeyrobotsinc.9875 4 ปีที่แล้ว +1

    Ok

  • @halivudestevez2
    @halivudestevez2 5 หลายเดือนก่อน

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