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 Stefan 3 · Mar 16, 2011 at 01:01 PM · itweenpathmoveto

iTweens MoveTo and "path" property

Hi there,

I don't know, what I'm doing wrong here, but I can't seem to use the "path"-property within MoveTo. Here's the code snippet I use:

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

or more explicitely this one:

iTween.MoveTo(gameObject, iTween.Hash("path",[Vector3(1,2,3),Vector3(2,1,3),Vector3(3,2,1)], "time",5));

The object to which the code is attached doesn't move at all. However if I add "movetopath",false it will stick right to the first node of the path - but won't move as well.

iTween was a big help so far and I checked the examples for PutOnPath and PointOnPath but the Path-Editor + MoveTo seems more like the solution for me because of the easing for the movement.

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

7 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by pixelplacement · Mar 16, 2011 at 04:04 PM

That's odd - are there any other scripts on the GO?

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 Stefan 3 · Mar 16, 2011 at 04:13 PM 0
Share

Hi Bob, yes I currently have both path solutions going in my scene. the one from the PutOnPath-example and the Visual Path Editor. I'm removing the PutOnPath scripts now. let's see what it does.

avatar image Stefan 3 · Mar 16, 2011 at 04:25 PM 0
Share

Nope, nothing happened. I switched off all scripts now and deleted the pathPoints from the previous script. One thing maybe: I placed the iTweenPath c#-script and the Editor-folder in the Plugins-folder - just where iTweens is located. Is that correct?

avatar image
1

Answer by pixelplacement · Mar 31, 2011 at 09:24 PM

Is this resolved?

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 Stefan 4 · Apr 09, 2011 at 07:30 PM 0
Share

sorry, for replying so late. I worked a different approach for this not utilising itween though.

But I figured that the $$anonymous$$oveTo method combined with paths only works at Start() or any other one-shot functions but not in Update(). That seems to be the case with most of iTweens methods (ColorFrom e.g.) $$anonymous$$aybe that is a UnityScript restriction?

avatar image Wolfram · Jun 26, 2012 at 11:50 PM 0
Share

@Stefan 4: Umh, when putting the iTween call in Update(), you will probably call it each frame, which is not a good idea. Each iTween creates a temporary iTween objects that's attached to the calling object, and which has an Update() function on its own, doing the tweening. There's no need / it's not the intention to call iTween.Whatever every frame.

avatar image
0

Answer by Stefan 4 · Mar 17, 2011 at 01:46 PM

I prepared a simple and small test-project. Perhaps someone can figure it out. I might be totally wrong, with what I'm doing, so any help would be much appreciated!

Here's the file: http://www.sendspace.com/file/2se5fr

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 ben · Mar 18, 2011 at 11:34 AM

surely it ll work specify the name of the path u have created correctly

iTween.MoveTo(gameObject, iTween.Hash("path" , iTweenPath.GetPath("CamPathForward"), "time" , 10, "easeType", iTween.EaseType.easeInOutSine));

CamPathForward - path name ...v created using pathEditor script

Comment
Add comment · Show 3 · 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 Stefan 4 · Mar 19, 2011 at 07:50 PM 0
Share

Yep, that's exactly what I did. Please have a look at the test project which I posted above. $$anonymous$$aybe you will be able to spot the problem in no time.

avatar image ben · Mar 24, 2011 at 04:42 AM 0
Share

do u have iTween & iTweenPath script in c# or .js......teh script i have posted is in c# it will work only with c# scripted iTween packages

avatar image Stefan 4 · Apr 09, 2011 at 07:24 PM 0
Share

yes I'm using javascript but your line and the syntax also works in javascript!

avatar image
0

Answer by newnixon · Apr 30, 2012 at 04:34 PM

I am having a similar issue. I have a truck with a camera inside the cab showing all the different types of radios. I have a gui that you click to take down each path depending on which radio you choose. The itween paths work and it flows well, the issues comes in when I attach a script to the camera to make it look to a cube that i have animating using moveto. I couldn't figure out how to rotate the camera toward an object once the path ended so I use the

void Update () { transform.LookAt(target);

 }

The target is the cube.

This works but he camera is jittery as it travels down the path to look at the cube. If I take off the LookAt script, the camera runs smooth but the camera is not looking at the object. There is no colliders on the box. Do you have any solutions?

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
  • 1
  • 2
  • ›

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Go back to first node (itween + moveto) 2 Answers

iTween, moving to a node on a path. 1 Answer

iTween - look for new path, move to or reverse at end? 0 Answers

iTween Camera Jitter while moving on path 2 Answers

itween MoveTo IndexOutOfRangeException 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