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 /
avatar image
0
Question by meiru · Oct 02, 2017 at 09:27 PM · configurablejoint

angular limits

I want to restrict the rotation around the x axis of my configurable joint, but my limits don't work. That's why I tryed to do all on the y axis.

joint.angularYLimit = new SoftJointLimit() { limit = 20.0f }; joint.angularYZDrive = new JointDrive{ maximumForce = 10.0f, positionSpring = 0.0f, positionDamper = 0.0f }; joint.angularYMotion = ConfigurableJointMotion.Limited;

this works... but when I try to do the same on the x axis... nothing works... those limits are ignored and I don't know why.

joint.lowAngularXLimit = new SoftJointLimit() { limit = 20.0f }; // also -20.0f doesn't work joint.highAngularXLimit = new SoftJointLimit() { limit = 20.0f }; joint.angularXDrive = new JointDrive{ maximumForce = 10.0f, positionSpring = 0.0f, positionDamper = 0.0f }; joint.angularXMotion = ConfigurableJointMotion.Limited;

... so, what's wrong? ... or what am I missing?

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by meiru · Oct 02, 2017 at 10:01 PM

Now that's great... typical rubber duck debugging... here's the answer: those joints seem to be pre-configured (in my case at least) and they had the values of 160 low and 160 high... what I did now was, I did set the high first to 90 and then the low wo -20 ... but unity did ignore the high value, because it was lower than the low value (160) that was already in... I changed the order and I'm not first setting the low value and later the high value (of course I'm checking the old values now first, just to make sure I'm not running into this problem again... or just set it 2 times). ... but, now it works... I didn't expect, that a simple assignement operator doesn't work and I never checked that... maybe this helps someone in the future when he/she is finding this

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
avatar image
0

Answer by BlueBoxProductions · Sep 29, 2021 at 05:42 AM

Old topic, but I was also having issues with this. I was creating a new configurable joint at runtime and assigning values. I could seemingly get everything other than low angular X and high angular X to work.

I was setting min to -177 then max to 0.

Changing the order in which I set them fixes the issue;

setting max to 0 then min to -177.

(side note, you have to specify your min value as a negative otherwise it will just clamp to 0)

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

70 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 avatar image

Related Questions

How do I set up a ConfigurableJoint so that it behaves just like a HingeJoint? 1 Answer

ConfigurableJoint to constrain objects to a straight track 0 Answers

consecutive angularxdrive.positionspring.equals() not working 0 Answers

Help needed with creating custom 3D Slider Joint 0 Answers

I need help with rotating my active rag doll that uses configurable joints with the camera 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