Making characters move with sequences
Making characters move with sequences
Is there any way to make a character move with sequence commands other then using AICharacterControl (I want to make a character move but I don't want to use the default Third Person Controller)?
Re: Making characters move with sequences
Hi Alex,
It depends on what you mean by "move". If you want to move a GameObject from its current position to a new position X over 3 seconds, you can use the MoveTo() sequencer command:
where "X" is the name of a GameObject (typically an empty one) and "MyCharacter" is the name of the character you want to move. This must translates the GameObject's position.
If you want to make the character face the same direction as X, you can add in the LookAt() sequencer command:
This rotates MyCharacter to look at X over 3 seconds.
And if you want to play an animation state while the character is moving:
It depends on what you mean by "move". If you want to move a GameObject from its current position to a new position X over 3 seconds, you can use the MoveTo() sequencer command:
Code: Select all
MoveTo(X, MyCharacter, 3)
If you want to make the character face the same direction as X, you can add in the LookAt() sequencer command:
Code: Select all
MoveTo(X, MyCharacter, 3);
LookAt(X, MyCharacter, 3)
And if you want to play an animation state while the character is moving:
Code: Select all
AnimatorPlay(Walk, MyCharacter);
MoveTo(X, MyCharacter, 3)->Message(Arrived);
LookAt(X, MyCharacter, 3);
AnimatorPlay(Idle, MyCharacter)@Message(Arrived)