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 Daniel 18 · Apr 18, 2011 at 05:12 AM · animationitweenpath

Run an iTween path backwards?

Hi All,

A simple yes or no, followed by any ideas on how would be great for this one. I've been wracking my brain trying to work out a method of animating backwards along a path using MoveTo from the iTween set. Is it even possible? And then secondly, how would you run that path from the present location. Like hitting rewind on a tape?

I was considering using a reverse array command in there somewhere, but then that wouldn't let me pick up where my present location was.

Cheers, Daniel

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 Mai hime · Apr 27, 2011 at 11:08 AM 0
Share

use pingPong as a loop type

avatar image Daniel 18 · Apr 27, 2011 at 11:24 PM 0
Share

That's fine if I wanted to get to the end of the path first. But I'm after swapping direction at any point along the path. Thanks though.

avatar image Lacrymology · May 17, 2011 at 04:25 AM 0
Share

I'm working on something similar though simpler. Are you using the iTweenPath class? if so, are you calling iTween by hand as in iTween.$$anonymous$$oveTo(object, iTweenPath.GetPath(myPathName), or how are you doing this? in a nutshell, you'll need to add an option to revert the path, call iTween.Stop[ByName](), and then run along a new path with a partial subset of your path.

avatar image Daniel 18 · May 18, 2011 at 12:06 AM 0
Share

That is pretty clever. I'll have to give that a go. Yes I'm using the iTweenPath class and yeh doing it by hand. Have to think of a way of getting a subset of my path. Had to move on to something else in the meantime, but I was starting to plan on tweening between percentages along the path, just deducting a 0.01 percent each time to begin with and work out a better value as I go along.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Android324 · Jun 15, 2012 at 02:41 PM

Hi Daniel. Had the same problem recently and the solution is quite easy (this worked in my case hope it'll help u too):

Let's say this is the way to go from A to B :

iTween.MoveTo(gameObject, iTween.Hash("path", iTweenPath.GetPath("Path1"), "time", 5, "easetype", iTween.EaseType.linear));

The code that will move your object from B to A would be :

iTween.MoveTo(gameObject, iTween.Hash("path", iTweenPath.GetPathReversed("Path1"), "time", 5, "easetype", iTween.EaseType.linear));

Cheers Paul S.

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 Bluestrike · Sep 06, 2012 at 11:37 AM 0
Share

Looks like I have a outdated version as GetPathReversed did not work :) Grabbed the latest and it works great :)

avatar image Android324 · Sep 18, 2012 at 07:06 AM 0
Share

glad to hear that :)

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

2 People are following this question.

avatar image avatar image

Related Questions

Is it possible to move through itween path manually with a parameter except of time? 1 Answer

How to control an animation by touch position along a path? 1 Answer

itween MoveTo IndexOutOfRangeException 0 Answers

An odd iTween+RageSpline animation issue with trigger/collider! 1 Answer

Dynamic animation method ✾ 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