Hello again!
Today I want to ask why exactly I still get flagged by anticheats like AAC or GRIM for my movement.
This is my code for the fix:
firstly I check if the movement is even relevant even more.
if it is just a bit i normalize the movement,
Now i adjust the x and z by the values of the sin and cos to lower the movement.
is anything wrong here?
Today I want to ask why exactly I still get flagged by anticheats like AAC or GRIM for my movement.
This is my code for the fix:
Java:
fun fixVelocity(velocityEvent: PlayerVelocityEvent, yaw: Float): PlayerVelocityEvent {
val movementInput = velocityEvent.movementInput.lengthSquared()
val velo =
if (movementInput < 0.001) {
Vec3d(0.0, 0.0, 0.0)
} else {
var vec3d =
if (movementInput > 1.0) velocityEvent.movementInput.normalize() else velocityEvent.movementInput
vec3d = vec3d.multiply(velocityEvent.speed.toDouble())
val sinYaw = MathHelper.sin(Math.toRadians(yaw.toDouble()).toFloat())
val cosYaw = MathHelper.cos(Math.toRadians(yaw.toDouble()).toFloat())
Vec3d(
vec3d.x * cosYaw.toDouble() - vec3d.z * sinYaw.toDouble(),
vec3d.y,
vec3d.z * cosYaw.toDouble() + vec3d.x * sinYaw.toDouble()
)
}
velocityEvent.velo = velo
return velocityEvent
}
if it is just a bit i normalize the movement,
Now i adjust the x and z by the values of the sin and cos to lower the movement.
is anything wrong here?