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
3
Question by dean_0707 · Jun 07, 2012 at 11:49 AM · rotateaxiscontinuous

Continuously Rotating Script?

Hi, I just needed the code to make a GameObject continuously rotate around on it's y axis throughout the whole game (preferably every 5-6 seconds is will reach 360 Degrees and start again if you know what I mean). Thanks, Dean.

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 SallarQ · Jul 21, 2017 at 04:02 PM 0
Share

i'm also looking for this, but i also want to move the objects from left to right, i'm using three rocks and i want it them to spin and move from left to right, i hope you can understand, i can't explain more b/c my English is so bad, Thank you in advance.

2 Replies

· Add your reply
  • Sort: 
avatar image
12

Answer by Bunny83 · Jun 07, 2012 at 11:51 AM

That's really easy:

 var rotationsPerMinute : float = 10.0;
 function Update()
 {
     transform.Rotate(0,6.0*rotationsPerMinute*Time.deltaTime,0);
 }
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 idiot333 · Feb 20, 2015 at 07:20 PM 0
Share

what if we do not want to put it in the update function? I mean, i just wanna call the function once and it should continuously rotate it.

avatar image HappyLDE · Feb 20, 2015 at 07:54 PM 1
Share

@idiot333 you can then in the Start() function set the torque to a rigidbody without it having angular drag: rigidbody2D.AddTorque(20);

avatar image
1

Answer by dean_0707 · Jun 07, 2012 at 04:35 PM

Yes, This was exactly what I was looking for, I'm a beginner with Unity so it all seems pretty hard, thanks!

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

8 People are following this question.

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

Related Questions

use world axis when using transform.rotate 3 Answers

how to know if an axis has been full rotated? 1 Answer

Face to direction, in a Mario Galaxy style game? 1 Answer

Rotate Object to face 2 axis? 1 Answer

rotate object around another object 1:1 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