Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

MojoActions.TsActionSnapTo


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
class TsActionSnapTo extends TsAction
	native;

var(Action) MojoKeyframe target;
var(Action) bool reset_animation;

function bool OnStart()
{
	Actor.setLocation(target.position);
	Actor.setRotation(target.rotation);

	// disable phsyics, or else the actor may try to phys move out of their snap position
	Actor.SetPhysics(PHYS_None);

	if (reset_animation)
		Actor.StopAnimating();

	return true;
}

function bool OnTick(float delta)
{
	return false;
}

defaultproperties
{
	DName				="Snap Object"
	Track				="Position"
	Help				="Snap an object to a particular position"
	ModifiesLocation = true

	reset_animation = false
}

Overview Package Class Source Class tree Glossary
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.405 - Created with UnCodeX