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
1
Question by F3RILLA · Oct 28, 2013 at 12:29 AM · rotationrotate objectitweenxaxis

iTween Constant Rotation

Hey guys,

I'm trying to figure out a method where the object can rotate around the X-axis in a fixed position using iTween. I've played around with it a lot and still can't figure it out. I have tried multiple methods on the documentation page, such as: RotateTo, RotateBy and ShakeRotation.

Does anyone know how to figure this out?

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

3 Replies

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

Answer by hdgam3r · Oct 28, 2013 at 12:46 AM

Have you tried with rotate by?

 iTween.RotateBy(gameObject, iTween.Hash("x", 20.0f, "looptype", iTween.LoopType.Loop));

What this does is rotate around the x axis at an ammount of 20.0f units, while looping forever.

Please double check the code since I haven't tested it.

Hope it helps.

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 F3RILLA · Oct 28, 2013 at 01:04 AM 0
Share

That worked perfectly, I'll play around with it and customize it a little more now, thanks!

avatar image
1

Answer by Bryan-Legend · Jan 29, 2016 at 05:27 PM

Here's some code that I use to spin on the Y axis once every 3 seconds.

                 iTween.RotateBy(item, iTween.Hash(
                     "y", 1.0f, 
                     "time", 3f,
                     "easetype", "linear",
                     "looptype", iTween.LoopType.loop
                 ));
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 ShanMirza28 · Nov 14, 2018 at 06:25 AM

For constant rotation on y axis. just add easeType and set it to linear.

here is the code. iTween.RotateBy(gameObject,iTween.Hash("y",1,"time",5,"looptype",iTween.LoopType.loop,"easetype",iTween.EaseType.linear));

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

18 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

Related Questions

Problem when i rotate a 2d object aroun Z-axis 1 Answer

Rotate object in the direction where it is going 1 Answer

How to rotate an object with animation? 0 Answers

Why the player is not rotating and moving at the same time ? 0 Answers

How do I combine Orbiting with mouse drag and with a button click? 0 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