Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
2
Question by CS-Kyle · Dec 19, 2013 at 11:17 AM · rigidbodypositionconstraints

Rigidbody Freeze Contraints Not Working

Hey everyone,

I have a simple object with a Rigidbody that has it's Y position frozen. I don't want any movement on the Y axis whatsoever.

The freeze works fine when there are no physics interactions... However, when the object collides with another physics object, it's Y position begins changing (very slightly, only tenths of a unit per second). If it's not frozen, the Y position changes much more rapidly, so the freeze is doing something, just not enough. I can't figure out why this is occuring.

I have no scripted collision interactions at the moment, so it's only the physics system acting on it.

Do I need to manually set the Y position to 0 constantly in a script? That feels... odd to me, especially since the constraints are there for this specific purpose.

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 nrXic · May 18, 2015 at 07:19 AM 0
Share

I'm having the exact same issue, and I've noticed the problem only exists when I have a collider on the object (whether mesh, or box collider). Enable the collider, and the object will slowly fall downwards.

Just in case I've also disabled gravity on the rigidbody, as well as setting Gravity to zero (set it to 0m/s in Physics settings).

I realize your post is from a couple of years ago, with no responses, so I'm skeptical this comment will help much but hey it doesn't hurt to try, right?

2 Replies

· Add your reply
  • Sort: 
avatar image
5

Answer by belamessex · Jan 11, 2016 at 06:27 AM

@nrXic I think I figured it out. I'm using a sphere collider, but I had the center of the collider slightly off at 0,-.5,0 (you can change the collider's center in the component menu) . I changed it to 0,0,0 and problem solved. Freezing position takes place in local space, not world space, so I believe it has to do with a skewed rotation or collision force based on the collider center, that causes the Rigidbody to interpret it's local space in a weird way.

Hope that helps.

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 Nadir_Alishly · Aug 28, 2020 at 07:05 AM

I had a same issue when freeze position and rotation not worked as they supposed to. I had two (box) colliders on my object, but one of them was under Rigidbody component. When moved collider up everything started to behave normally. Don't think that it will solve every issue, but it worked for me.

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

21 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

Related Questions

holding position 1 Answer

Unfreeze Rigidbody ROTATION only 1 Answer

Is it possible to constrain an object's rotation in worldspace? 2 Answers

UnityEngine.Rigidbody does not contain a definition for `contraints' 1 Answer

Constraining Rigidbody to Spline 4 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