Hi guys.
Today I wanted to begin writing anti cheat for my game. But, my game involves alot of physical interactions, so, player can be easilly get flinged. And, I have began wondering - how to differentiate this from flying with cheats?
Just check for the studs moved per frame, and if its more than maximum allowed, correct the position. (You could make the maximum Y change different so it can detect flying better) This way, you would prevent flying without kicking anyone falsefully
But if player got flinged, it will be detected aswell. Flinging is normal behavior, cuz all explosions possible.
Then see if the exceeding in the maximum studs per frame exceeds the maximum for a certain maximum time, if so correct it? So player would need to exceed it for around 1 seconds to get corrected
- Check if player isn’t touching ground
- Check if Y position doesn’t change by large amount (each second Y is v0t + 0.5at^2 smaller or bigger depending on fall/fling direction)
- Check if player’s position change, and if it’s not too slow
Flying is more precise usually, so player will move with constant velocity and usually move not that fast like explosion fling
Flinging on the other hand is random and usually includes fast movement that works on physics, rather than constant