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
4
Question by overunity3d · Aug 21, 2011 at 07:16 PM · rotationrigidbodytransformtransform.rotation

Rigidbody rotation vs Transform rotation

If the rigidbody rotates is the transform.rotation effected? Are there 2 separate axis? The transform.rotation can tumble freely but the physics is applied to the rigidbody.rotation?

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
2
Best Answer

Answer by suruz@kento · Nov 20, 2011 at 10:11 AM

It Just a matter of how you change transform property of a gameObject.You can change transform with physics through rigidBody, or you can change it using animation component, even you can change it manually.End result is they all are effecting same transform property.

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
7

Answer by Peter G · Aug 22, 2011 at 01:35 AM

You are correct. If you modify the rotation using transform.rotation the object will ignore collisions that might have occurred so that it can reach that rotation no matter what objects might be in the way.

When you assign a value to rigidbody.rotation the object will be rotated from its current rotation to the assigned rotation, but it will be blocked by the physics engine if it can't make the rotation. Then it will be stopped somewhere between its old rotation and the rotation you assigned to it.

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 markhula · Sep 22, 2011 at 11:53 AM 1
Share

Sorry to cut in here.

Does this suggest it's safe to adjust a non kinematic rigid body using rigidbody.position and rigidbody.rotation and not mess the physics???? i.e. position/rotate the rigid body manually then have physics apply any alterations?

This is ok???

Cheers

avatar image
7

Answer by Joshua · Aug 22, 2011 at 01:36 AM

When getting (reading the values) it's the same. The difference is that when you set the transform.position or rotation it will be applied at the end of the frame but for rigidbody.position or rotation it will be applied at the end of the next physics step.

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 Johannski · Jun 11, 2015 at 10:14 AM 0
Share

I think that is the most important answer, because once you try to do two different rotations in the same step, that don't know from each other you will run into problems if you use rigidbody.rotation. I recommend to use transform rotation for every problem.

avatar image
2

Answer by DGArtistsInc · Aug 22, 2011 at 01:29 AM

i dont quite understand what you mean but rigidbody is a component and transform is just its position, rotation, and size of an object in the 3d world. A component can be applied to an gameObject. But an gameObject is a mesh(or not) with certain transforms.

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

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

how can i stop rotating gameobject but slowly 1 Answer

transform.localRotation lerp precision 1 Answer

The best way for working with rotation in 2d game 1 Answer

Objects not rotating right half the time based on another object 0 Answers

Rotating Rigidbody properly using AddRelativeForce 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