- Home /
This question was
closed May 24, 2014 at 07:45 AM by
Fattie for the following reason:
Duplicate Question
Question by
temstindoesunity · May 23, 2014 at 02:04 PM ·
animationdetectionidle
How to detect player idleness?
How would i go about checking if the player is idle? Because i'd like to have an idle animation play when the player has not moved for an X amount of time.
Comment
Best Answer
Answer by Cherno · May 23, 2014 at 02:20 PM
You could declare an idle timer variable that constantly goes up and if it reaches a threshold, you play the animation. It gets reset whenever the character presses a movement button, or you store his last transform.position and whenever it is the same as his current one the timer starts.
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Blender Animation Looping Delay Problem 2 Answers
SpriteManager 2 1 Answer