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
0
Question by Shamini · Apr 22, 2015 at 02:30 PM · rotationgravitydirection

find rotating direction of object on circle

Object coming from circle A and colliding circle B. On collision of object how to find in which direction object should rotate on circle, clockwise or anticlockwise. circle A and B can be in any positions ie parallel to each other horizontally, vertically and diagonally. i have followed fauxgravity https://www.youtube.com/watch?v=gHeQ8Hr92P4 and making 2D game. alt text

untitled2.png (11.9 kB)
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by SUMFX · Apr 22, 2015 at 04:31 PM

http://www.real-world-physics-problems.com/physics-of-billiards.html

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 screenname_taken · Apr 22, 2015 at 02:34 PM

That can be easily checked by reading the rigidbody's angularVelocity."insert the axis you want to read here" (i.e. rigidCache.angularVelocity.x; Note: rigidCache is just a variable that i cached my rigidbody in at Start() ) it'll be positive or negative depending on which way it's turning.

If what you want to do is to have a character jump on a rotating something and then stick to it and rotating along with it, you may just try to parent the player to the moving platform.

Keep in mind that if you are using gravity, the player won't stay on the parent if it goes under it. Gravity will pull it down.

Edit: Do you mean though that your roller is stationery and you want it to rotate accordingly once the player jumps on it?

Then add a rigidbody to it, give it mass, and at the Freeze rotation tick the boxes of the rigidbody component tick all the axis except the one you want to revolve through.

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 Shamini · Apr 23, 2015 at 06:22 AM 0
Share

I want to rotate player around circle on collision accordingly in clockwise or anitclockwise. I have used rigidbody2d, so freezing rotation of axis and reading angularvelocity is not possible. I have updated above diagram for proper understanding.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Shoot an object and have it move based on rotation 1 Answer

switching direction of gravity 1 Answer

How do I fix gravity going down(-y) not down form player rotation? I mean if player is rotated in any direction, gravity will go to that direction. 0 Answers

How to change the angle my character falls at 1 Answer

How to make an object go the direction it is facing? 6 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