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
0
Question by joemcd88 · May 28, 2012 at 05:36 PM · rotationrigidbodypositionfreezesphere

Freeze rigidbody position without affecting rotation - please help!

I have 2 spheres on a flattened cube. All 3 items have rigidbodys and colliders.

For some reason, when gravity is used, the spheres slowly sink in to the cube. They stop about a sixth of the way in (ie 5/6ths of the sphere is above the surface).

To stop that, I unchecked 'Use gravity'. Unfortunately, when one sphere knocks in to another, it sends it flying off in mid air. So then I locked the positions of the spheres on the y axis by checking Freeze position under Constraints.

This is perfect apart from the fact it stops the spheres from rolling properly - they only seem to spin on the y axis (funnily enough). I haven't got any 'Freeze rotation' boxes checked and they roll fine when I don't freeze the position (just the aforementioned problems).

I'm really stuck on this one and have tried searching before posting. If anyone could help me make sure the rigidbody spheres keep their Y positions without affecting their rotation, please do! :-)

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 You! · May 28, 2012 at 05:42 PM 1
Share

You may need to back up a few steps... Did you place the spheres above the flattened cube? If you did not that is your original problem. Unfreeze rotation, check "Use gravity," and try this. objects tend to fall through other objects when the first object has gravity and is touching the second object.

avatar image joemcd88 · May 28, 2012 at 05:45 PM 0
Share

Sorry, I should have said - the spheres are definitely completely above the cube. I made them fall through the air and land on the cube to check it wasn't that :-)

avatar image joemcd88 · May 28, 2012 at 06:03 PM 0
Share

Thank you muchly for your comment, it inspired me to again try and solve the original problem! :-)

1 Reply

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

Answer by joemcd88 · May 28, 2012 at 06:01 PM

After several hours of trying to figure it out, it took me less than 10 minutes to fix it once I had asked the question (always the way!).

To stop the spheres sinking in to the cube, I took the following steps:

 1) Edit > Project Settings > Physics 
 2) Changed "Min Penetration for Penalty" to a lower value.

This stopped the spheres from going through the cube and should stop any similar problems anyone else might have in the future :-)

This might not be necessary unless you are working with really small game objects as the bigger the object, the less noticeable it is.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Rotating sphere with rigidbody attached 1 Answer

Get direction of moving sphere? 1 Answer

how to CORRECTLY position and rotate a gameobject in unity 2 Answers

Objects Instantiating at wrong position 3 Answers

How to always face player relative to player's rotation and how do I use TransformDirection to move a player regardless of Y-rotation? 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