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 ChrisJoosten · Mar 19, 2014 at 10:12 AM · c#rotationmultiplepoints

Rotation multiple points, help needed

Hi!

I'm trying to make an object which can rotate/move at 3 different points. As you can see at the picture below.

But my problem is when I rotate 1 point it rotates the whole object, but I want just that point to change position/rotation. So when I change the Y-axis at point 1, I want only that point to go up and the others just have to be static at their points.

alt text

ffa.jpg (37.0 kB)
Comment
Add comment · Show 3
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 robcbryant · Mar 19, 2014 at 10:17 AM 0
Share

Hmmm ... Can you clarify the idea a bit better? Are these points separate objects? What's their relation to the large red rectangle?

avatar image ChrisJoosten · Mar 19, 2014 at 10:20 AM 0
Share

The points 1,2,3 are "Screws". The red object is where they are connected you. So when you twist screw 3, you would change that position/rotation and I want it to have effect on the red object. So it rotates, but point 1 and 2 have to stick at the position. Only when you "twist" them they have to change position

avatar image ChrisJoosten · Mar 19, 2014 at 10:34 AM 0
Share

I need to set 3 X, 2 Z and 1 Y position for the $$anonymous$$ain Object. And I need to be able to change them

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by ShadoX · Mar 19, 2014 at 11:23 AM

Looked for something similar recently, the trick is to spawn another empty game object and use it as the pivot via

https://docs.unity3d.com/Documentation/ScriptReference/Transform.RotateAround.html

so something like

 transform.RotateAround(pivot.transform.position, Vector3.forward, -120);

will rotate the object around, the pivot game object, all you have to do is to calculate the position of the pivot and set it at the desired spot :)

[edit] sorry, seems like I got the wrong idea, but perhaps that might be still of use for you

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 ChrisJoosten · Mar 19, 2014 at 12:02 PM 0
Share

Thanks for your help, but I got 3 different points to rotate around. I think this will come in handy. I'm gonna take a look at it.

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

21 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

Related Questions

Flip over an object (smooth transition) 3 Answers

Distribute terrain in zones 3 Answers

Multiple Cars not working 1 Answer

Camera Control/ Rotation C# 0 Answers

How to make the player rotate to where an object is being thrown? 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