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 LunarMoon · May 05, 2012 at 12:23 PM · itween

iTween... moving in a closed path, in loop, no delay

I am new to unity and to iTween. I am trying to make an object move in a path, in loop, with no delay.

Imagine the path as a circle and the object moves along this circle constantly with no delay, smoothly.

I created a path with 9 nodes. Each node is over a circle, every 45 degrees. The first node is at 0 degrees in the circle and the last one at 360 degrees, that is the same starting point. I was not sure if should have this 9th node or stop at the 8th node...

Then I added this line to the object

 iTween.MoveTo(gameObject, iTween.Hash("path", iTweenPath.GetPath("zero"), "time", 5, "loopType", "loop", "orientToPath", true, "delay", 0));

I was expecting this to be smooth, but it runs the loop, waits about 2 seconds, runs it again, etc. and the movement is not linear it is more like accelerating at the start and breaking at the end.

Is there a way to create a perfect loop with any path using iTween?

In this case the path was a circle but I intend to use it on different paths, always closed ones.

thanks.

Comment
Add comment · Show 4
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 chuckbergeron · May 05, 2012 at 04:49 PM 0
Share

Where did you put the iTween.$$anonymous$$oveTo call, inside an Update(){} block? If so, it's being called every frame (probably more than 30+ times per second). It may also help to cache the result of iTweenPath.GetPath("zero"), so it doesn't need to do that lookup on each loop call.

avatar image LunarMoon · May 05, 2012 at 06:05 PM 0
Share

I put that not on update, but on start().

avatar image chuckbergeron · May 05, 2012 at 06:24 PM 0
Share

Ah, I should have scrolled horizontally and read the whole line. Nah that looks solid, now I'm even curious as to why you're getting the delay.

avatar image rjohannessen · Jan 18, 2017 at 04:26 PM 0
Share

Did you ever get this figured out?

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by xandermacleod · Nov 08, 2013 at 11:32 AM

bump - (I have the same problem)

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 SB2020 · Jan 24, 2014 at 01:46 PM

You need to add - "easetype", iTween.EaseType.linear to the Hash as without it iTween will default to easeOutExp.

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

iTween PutOnPath 1 Answer

triggering character bone anmimation from Itween 0 Answers

Null Ref Error with Playmaker and iTween 1 Answer

Rotation facing the right way problem 0 Answers

How to reset an game object's position 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