http://www.closier.nl/blog/?p=75
scroll down to the rails example. its simply a matter to pass a lookAtTarget.
var name changed 3 times over the years, but idea is same. In 3.6 you do not 
need to pass a lookAt boolean, the object is enough. same for 4.0
while in previous engines, as in the tutorial, you would need to specify this.

and read the doc. addOnCycle and other methods for this class.

Fabrice


On May 12, 2011, at 3:10 PM, ekreinhard wrote:

> How do I implement a spring camera in the pathanimator code. I want
> the camera to be closely behind the car and follow it while moving
> along the path.
> Many thanks
> 
> On 12 Mai, 15:01, ekreinhard <[email protected]> wrote:
>> How do I implement "removeOnCycle" as code when having this:
>> 
>> pathanimator = new PathAnimator(path,Car,{fps:
>> 30,alignToPath:true});....
>> 
>> .....
>> 
>> protected override function onEnterFrame(event:Event):void
>>                 {
>>                         time +=0.003;
>>                         pathanimator.update(time);
>> 
>>                         camera.lookAt(Car.position);
>> 
>>                         //Car.rotationY +=2;
>>                         wheelRF.rotationY -=30;
>>                         wheelRB.rotationY -=30;
>>                         wheelLF.rotationY +=30;
>>                         wheelLB.rotationY +=30;
>>                         super.onEnterFrame(event);
>> 
>>                 }
>> 
>> thanks
>> 
>> On 12 Mai, 14:52, Fabrice3D <[email protected]> wrote:
>> 
>> 
>> 
>>> removeOnCycle should do it no?
>>> as about stopping the animation... as you have full control of the pointer 
>>> value, when you update or not, It's pretty much in your hands.
>>> But may be I'm missing a point here. If yes, can you explain more about the 
>>> expected behaviour please?
>> 
>>> Moving an object on the path would require just an interpolation between 0 
>>> and 1. Tweens engine are good at this. Update with value 1 would place your 
>>> sphere at the end of the Path.
>> 
>>> Fabrice
>> 
>>> On May 12, 2011, at 2:36 PM, ekreinhard wrote:
>> 
>>>> Hi,
>>>> I have gone through the tutorial onPathAnimator.
>>>> How can I stop the animation from going through more than one cycle. I
>>>> want the sphere to stop at the end of the path.
>> 
>>>> Thanks
>>>> ekreinhard- Zitierten Text ausblenden -
>> 
>>> - Zitierten Text anzeigen -- Zitierten Text ausblenden -
>> 
>> - Zitierten Text anzeigen -

Reply via email to