Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation
previous class next class | frames no frames

# MojoActions.TsActionInterpolateTo

00001 00002 00003 00004 00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059

    class TsActionInterpolateTo extends TsActionInterpolateBase
    	native;

    var(Action) MojoKeyframe Target;
    var(Action) float duration;
    var(Action) float ease_in_time;
    var(Action) float ease_out_time;

    var float elapsed_duration;

    native function CalculateConstants(vector initial_pos, rotator initial_rot);
    native function UpdateCurrentKeyframePos(float time);

    function bool OnStart()
    {
    	elapsed_duration = 0;

    	CalculateConstants(Actor.Location, Actor.Rotation);
    	StartActorInterpolation();

    	return true;
    }

    function bool OnTick(float delta)
    {
    	elapsed_duration += delta;

    	UpdateCurrentKeyframePos(elapsed_duration);
    	ApplyCurrentKeyframePos();

    	return (elapsed_duration < duration);
    }

    function OnFinish()
    {
    	FinishActorInterpolation();
    }

    event bool SetDuration(float _duration)
    {
    	duration = _duration;
    	return true;
    }

    event float GetDuration()
    {
    	return Duration;
    }

    defaultproperties
    {
    	DName				="Interpolate To"
    	Track				="Position"
    	Help				="Interpolate an object to a point"
    	ModifiesLocation = true
    	UsesDuration = true

    	duration			=1.0
    }

Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation
previous class next class | frames no frames

Class file time: ne 5.9.2004 15:53:36.000 - Creation time: st 23.5.2018 00:10:49.295 - Created with UnCodeX