Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
2
Question by akinunsal · Jan 02, 2016 at 12:53 PM · c#physicsrigidbodyfunction

JointDriveMode is obsolete, any alternatives?

I had a C# code where i'd use JointDriveMode to set Configurable Joint data directly from code.

     [SerializeField]
     private JointDriveMode mode;
     [SerializeField]
     private float jointSpring = 20f;
     [SerializeField]
     private float jointMaxForce = 40f;

Now that it's obsolete, what do i do? I need an alternative for my code to work.

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jkraptor · Jan 06, 2016 at 07:48 PM 0
Share

I've got the same problem. $$anonymous$$y code add configurable joints on the fly and sets the mode to either Position or Velocity. So, how am I supposed to do this now? The docs say something about the flags were incorrectly applied anyway - but what's the work around?

avatar image kenmgrimm · May 02, 2016 at 06:31 PM 0
Share

$$anonymous$$ight as well credit the above code to Brackeys tutorial on youtube: $$anonymous$$aking a $$anonymous$$ultiplayer FPS in Unity. I'm at the same point as well after an upgrade to 5.3.

avatar image yakri · May 21, 2016 at 03:06 AM 0
Share

Yeah, I was working with the same thing and there doesn't seem to be any easy way to replace JointDrive$$anonymous$$ode that's compatible with this method at all.

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by yakri · May 21, 2016 at 03:17 AM

Alright, as far as I can tell from my research, the mode functionality is gone, so you just comment out

    //[SerializeField]
    //private JointDriveMode mode;


and then also remove the commented out code here

 private void SetJointSettings(float _jointSpring)
     {
         joint.yDrive = new JointDrive
         {
             //mode = jointMode, //remove this here
             positionSpring = _jointSpring,
             maximumForce = jointMaxForce
         };
     }

the joint mode functionality here. I'm fairly sure instead you just have to tweak some things about your joint in the unity editor, or use a configurable joint from the start if you really want the same effect Brackey's achieved. I don't really know what joint mode did but it doesn't exist anymore, however I am fairly sure that it's functionality exists via multiple varied settings in configurable joint.

see: http://docs.unity3d.com/Manual/UpgradeGuide53.html at JointDriveMode Flags

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image $$anonymous$$ · Jul 19, 2016 at 08:53 AM 0
Share

Can confirm, just commented the mode section out, no more errors and the player still moves the same way. Thank you Yakri

avatar image
0

Answer by meeruTheCoder · Nov 07, 2018 at 12:09 AM

Thank you! It works completely fine without that code, so I wonder why they made it unusable?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

69 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Adding Gravity to a game object to make a black hole sucking effect. 1 Answer

Rigid body robot animation 0 Answers

How to fix this problem? 1 Answer

Ball Speed is not increasing as per code 0 Answers

Problem. Pick up and Grab object script, except all objects in scene are picked up instead of one. 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges