Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Designopolis on March 12, 2013, 01:55:15 AM

Title: I cannot for the life of me get Orient to Path to work.[SOLVED]
Post by: Designopolis on March 12, 2013, 01:55:15 AM
Digging around, it seems the iTween Orient to Path functionality has proven kind of confusing, but as far as what I have found goes I can't find a solution to my particular issues. As far as I can tell, no matter what the settings are (unless I turn off orient to path altogether in which case the item will just stay locked to its rotations) the object wants to look at the end of the path. No changes to the settings concerned will garner a result other than no rotation or Looking at the end of the path the entire way.

Bizarrely, if I set the Look At Object field to None in variable mode, it works to the above effect. If I set it to None wherein it is asking for an object from the Assets/Scene menu, however, the animation will cease to function altogether.

As far as I can tell, the LookTime field isn't being recognized for whatever length I have entered. Is there something I need to set properly for that field to work?
Title: Re: I cannot for the life of me get Orient to Path to work.
Post by: courtneyrocks on April 11, 2013, 05:03:21 AM
Hey there,

I had the same issue. I found an answer on the Unity site.

You have to include a Look Ahead value. I think this determines how far ahead on the path the object is looking. I ended up using a a value of 0.001 and it finally works as it should.

Cheers
C
Title: Re: I cannot for the life of me get Orient to Path to work.
Post by: markfrancombe on April 11, 2013, 10:47:14 AM
Quote
a value of 0.001

WOW.. so small!!! No wonder I was having trouble!!! I cant wait to leave work and run home to try that in my project, I was having very simelar problems..

M
Title: Re: I cannot for the life of me get Orient to Path to work.
Post by: SpencerPDX on November 18, 2016, 04:04:45 PM
You have to include a Look Ahead value. I think this determines how far ahead on the path the object is looking. I ended up using a a value of 0.001 and it finally works as it should.

THANK YOU. To my mind, expected behavior for "Orient to Path" should be, you know, orienting to the path, not skidding around looking at who knows what, as seems to be the default. Been banging my head on the wall for half a day trying to figure this out, first with the iTween Visual Path mentioned here:

http://hutonggames.com/playmakerforum/index.php?topic=1699.0

...and then with the more standard path, added via game objects as Path Nodes. Neither came close to working until I entered the magic number .001 into Look Ahead.

The Look Ahead tooltip should include .001 as a suggestion for getting Orient to Path to work correctly (or what I think of as correctly).