Prevents player movement from overshooting