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
0
Question by Dytdyt · Apr 30, 2017 at 11:37 PM · physicstorqueinertia

simultaneously apply torque around 2 different axes

Hi again

I'm trying to achive a rotation around the world axis while also rotating around a local axis. For an example a 360 flip with a skateboard: https://www.youtube.com/watch?v=WsgrgDrOFDs The board rotates 360 degrees around the world y-axis and also rotates 360 around its own local axis.

An other example is from diving: https://www.youtube.com/watch?v=L5Md87Le1xU

By using transform.rotation i can get the rotation i'm looking for, but i would like to make it more physics based, so would it be possible to achive by using torque?

Thanks in advance

Comment
Add comment · Show 2
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 Fattie · May 01, 2017 at 12:01 AM 0
Share

Heh - this is a very tricky math question. Just try it ! simply apply local torques.

avatar image Glurth · May 01, 2017 at 08:50 AM 0
Share

I'd think:

 rb.AddTorque(rb.transform.right * fliprate); //to make the body do a forward flip whichever way it happens to be facing
 rb.AddTorque(Vector3.up* spinrate); //to make the body spin around world-Y

applying both in the same FixedUpdate should effectively be simultaneous. Though as bunny mentions, the resultant angular velocity will be about some "combination" axis. (that should be ok tho)

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by Bunny83 · May 01, 2017 at 01:48 AM

Well, any rigidbody object will rotate only around one axis at a time unless some sort of external force is applied. If you apply an impulse force around two different axis, the rigidbody will rotate around a combined axis that might be diagonal between your axes.

Note that rigidbody simulation is always simulated in worldspace. That's also true for the realworld, however the rotation of the earth is so slow that in most cases you can ignore it. Another important factor is the inertia tensor of the object. It represents the moment of inertia and basically specifies how much rotational resistance the object has around 3 axis. A skateboard can much easier "roll" around it's long axis than around the other two axis.

Unity calculates the inertia tensor based on the used colliders. However realworld objects usually have a non linear mass distribution. Most rigidbody systems assume an equal distributed mass / density. What you can control is where the center of mass is located.

A rigidbody object can't rotate around two different axis at the same time. It only has one rotation axis. If it appears to be rotating around two axis, it's either just a combined rotation axis, some sort of force / torque is applied or the moment of inertia changes over time. In your diving example a human can do both, change the moment of inertia of the body and apply torque by moving his arms / legs.

There was already a similar question a couple of years ago.

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

Compute the torque needed to rotate an object at a constant rate 3 Answers

How does unity add torque 1 Answer

How to decrease inertia for a rolling ball 1 Answer

Working with Physics 0 Answers

How to apply frictional Torque 2 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