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
3
Question by bartleycollin · Mar 23, 2014 at 05:51 PM · rotationunity 2dconstraintrigidbody 2d

Unity 2d - Rigidbody rotation constraints?

I'm using 2d rigid body's in my game and although rotation isn't currently a problem, I could see it be for the players. Is there any way I can turn off all rotation for my 2d rigidbodys? Thanks! :D

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

4 Replies

· Add your reply
  • Sort: 
avatar image
4

Answer by bigdaddio · Dec 08, 2014 at 01:47 AM

There is a checkbox in the RigidBody2D Fixed Angle. This stops it from rotating. I left this here in case anyone else finds 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
1

Answer by Destran · Mar 23, 2014 at 05:57 PM

Yes there is!! :D

go to your rigidbody component --> constraints, and mark free rotation: x,y,z and it will stop your 2d thing from rotating.

Comment
Add comment · Show 6 · 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 bartleycollin · Mar 23, 2014 at 05:58 PM 0
Share

Thanks for the advice, but that only works for 3d rigidbodys.. I was looking for a solution for 2d rigidbodys. Thanks for the help though! ;D

avatar image Destran · Mar 23, 2014 at 06:04 PM 1
Share

oh snap, you're right. sorry

avatar image bartleycollin · Mar 23, 2014 at 06:05 PM 0
Share

No Problem :)

avatar image Destran · Mar 23, 2014 at 06:08 PM 1
Share

time to redeem myself

going off of

http://answers.unity3d.com/questions/13370/lock-rotation-of-object.html

you could try: ?

 float lockPos = 0;
  
 void Update()
 {
      transform.rotation = Quaternion.Euler(lockPos, lockPos, lockPos);
 }
avatar image SHUTTER_CRY_GAMES Destran · Mar 11, 2016 at 09:20 PM 0
Share

Works great with the new unity! Thank you very much.

avatar image bartleycollin · Mar 23, 2014 at 06:22 PM 0
Share

Hmm.. Never thought of that.. Let me give it a try. I'll let you know how it turns out later! :)

avatar image
1

Answer by Reivaj28 · Aug 06, 2017 at 04:55 PM

alt text


screenshot-61.png (344.5 kB)
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 koload · Oct 22, 2017 at 08:07 PM

I can only type numbers in my constrainsts box, any help what to do with it?

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

26 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

Related Questions

How can I make 2d sprites for Unity ? 1 Answer

In unity 2D c# how to rotate an object like geometry dash? 1 Answer

How can I keep the Ground ALIGNED with the red line in the image below 1 Answer

How can you make a 2D object move based on rotation, and rotate while moving? 1 Answer

How can I limit objects rotation to fixed range of 0 to 1? 0 being no rotation 1 full rotation? 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