Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
1
Question by Rblain · Jun 21, 2010 at 04:37 PM · colliderragdollmeasure

Custom Ragdoll Autorigger Setup

Scenario : I am writing a custom ragdoll setup script I can drop on any rig that will take joint chains tagged with "Rig" on the joint object to indicate that the joint/joint chain should be set up with rigidbody, capsule collider and character joint. The joint lengths and transform can be derived from standard algorithms of angle and distance from parent to child objects.

Question : The capsule collider is scaled to match the joint of the rig when done manually. No problem there. In a script however there are no units to use to determine scale back and forth..meaning the joint comes in imported at a scale of 1,1,1 and the collider is scaled at 1,1,1 but they rarely if ever match up dimension wise. What i want to do is find the length of the joint from root to tip, scale the collider to that length and move it half the joints length down the z axis so the joint and collider are properly overlapped. My issue is where do I or how do I extract the information needed to ensure my scaling is correct in regards to bone length. With measured units it would be a breeze but I can have a joint 1 unit long that is scaled to 1 or a joint 1000 units long and it is still scaled to one.

Comment
Add comment · Show 1
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 Xedfire 1 · Apr 23, 2011 at 10:37 AM 0
Share

Have you finished this yet? Because it sounds extremely useful

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by StephanK · Jun 21, 2010 at 05:42 PM

A collider's height is set using the "height" property. Scaling is only a factor applied to this. To get the "real" length of a joint in a correctly setup rig it's enough to set the scale to 1 and measure the distance between a child and a parent. (e.g. float lengthOfLowerLeg = Vector3.Distance(knee.transform.position, ankle.transform.position))

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 Rblain · Jun 22, 2010 at 03:42 PM 0
Share

Thanks for the heads up. I overlooked the height property.

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

No one has followed this question yet.

Related Questions

i need help wih ragdoll colliders i cant even re positioning them 1 Answer

Ragdoll's big head collider 3 Answers

Rigidbody+collider conflicts with ragdoll structure 3 Answers

Ragdoll help 1 Answer

How can I cast a ray from a ragdolls child bone? And disable the rest 1 Answer


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