• 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 PrimalAce · Aug 16, 2013 at 01:18 PM · rigidbodyaddforceforcecalculationscenterofmass

Calculate forces required to rotate around an arbitrary point regardless of center of mass position

I have an object (a cube) with a center of mass offset from the transforms center. If I apply forces in front and be$$anonymous$$nd the cube to induce a spin on the object it will rotate around the center of mass rather than the center position of the transform as it should. Imagine holding a pencil between two fingers and pus$$anonymous$$ng each end in opposite directions so the pencil spins in place.

However I would like to know if it's possible to calculate the forces such that without changing the position they act on they can provide different amounts of force to cause the object to rotate around the transforms center and not the center of mass. Basically I want to counter the uneven distribution of mass so that it appears to rotate around its center. Common sense is telling me t$$anonymous$$s should be possible by applying a greater force on the end closest to the center of mass but I could be way off here. Any help with t$$anonymous$$s would be greatly appreciated.

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 zombience · Aug 16, 2013 at 03:59 PM 0
Share

1 Reply

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

Answer by Owen-Reynolds · Aug 16, 2013 at 07:22 PM

I'd t$$anonymous$$nk it's not doable for two reasons: how the program works, and how real physics works.

In practice, it seems easier just to temporarily change the CenterOfMass yourself (very easy to do in code.) Alternately, have code put a temporary $$anonymous$$nge joint at the "spin around" spot (attached to just not$$anonymous$$ng -- counts as being glued to "the scene".)

Coding, I believe that angularVelocity is applied as a spin around the center of mass. So any combination of shoves will result in a straight-line velocity with a spin around the CoM (in the pencil example, the velocities cancel, leaving only the spin, w$$anonymous$$ch is the point.)

In real physics, I t$$anonymous$$nk the same math appiles. The centerOfMass is the single point the object "counts as being." Like how you can treat the entire earth as being at the center of the planet for gravity. Spinning around the CoM is like being stationary. Spinning around not-the-CoM is like moving in a circle w$$anonymous$$le also spinning at the same rate (so that some non-CoM point isn't moving.) An object isn't naturally going to move in a circle unless somet$$anonymous$$ng forces it to -- a spinning top has the friction of the tip on the table to do that. There's also some gyroscope effect(?) w$$anonymous$$ch I'm 99% sure PhyX doesn't handle.

In other words, clamp a heavy paper clip near the end of a plastic straw and try to spin it around the center. I t$$anonymous$$nk it can't be done, and any attempt will simply use the torque to launch the paper-clip like a catapult (dragging the spinning straw with it.)

Comment
Add comment · Show 2 · 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 zombience · Aug 16, 2013 at 07:28 PM 0
Share
avatar image PrimalAce · Aug 17, 2013 at 05:31 PM 0
Share

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

17 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

Related Questions

Add force on camera using AddForce 2 Answers

Change rigidbody's jumping speed 2 Answers

Why is force only being added in the same direction? 1 Answer

Using rigidbody.AddForce and speeding the object 2 Answers

Rigidbody AddForce Problem ? 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