AFK detection

Hi, I am having a hard time devising a “away from keyboard” detection for a single player game which originates from the third person template.

basically I have tried storing the player’s location, followed by a retriggable delay, then comparing the stored position to the current position of the player. I am also checking whether there is any mouse or keyboard axis input before and after the delay.

Yet it doesn’t work as expected, does anyone know of a working approach to effectively detect whether the player hasn’t been active for a given amount of time? Here is my setup which at all doesn’t make sense about when the afk mode kicks in, and sometimes it just doesn’t do anything. I know it is on because my camera movement adjusts if the bored bool is true, the camera movement is not in this event chain however.

Hi.

Check for animations poses, if the same animation keep playing for 5 minutes means “something is wrong”.
Also, when the animation pose changes, save the location where the character is, this avoid setting afk when the player is, for instance, running for 5 minutes without stopping.

Hello there, thanks for your reply!

Comparing locations was my approach from the start, there should be no need to check axes at all, its just a bit of a failsafe I have implemented out of being desperate one night :), but perhaps you have a working setup for this, which would then look how?

Also what do you mean with checking animation poses? I currently just print the Boolean to be true or false to check whether its working. I do have animation states set up for this already, but they’re blended by the Boolean, which so far never kicks to be true and other times it switches on spontaneously while I’m running or browsing inventory. Also as I mentioned earlier I’m not trying to animate anything at this stage apart from camera movement.

I found a couple of flaws in my current approach, having simplified it I still have no effective way of detecting afk. All I did was remove the second part: the enhanced afk state and now trying to get the simplest version to work.

I couldn’t find any explanations, nor tutorials on afk detection using unreal engine, isn’t that weird since I think many people also make multiplayer applications with it, could someone point me in the right direction please?