How to use LiquidBounce's rotations utils in a script?
-
I don't know what isn't clear to you.
Here is an example:
if (e.getEventState() == "PRE") { entity = getNearestTarget(EntityZombie); diffX = entity.posX - mc.thePlayer.posX; diffY = entity.posY - mc.thePlayer.posY; diffZ = entity.posZ - mc.thePlayer.posZ; rotation = new Rotation((Math.atan2(diffZ, diffX) * 180 / Math.PI) - 90, -(Math.atan2(diffY, Math.sqrt(diffX * diffX + diffZ * diffZ)) * 180 / Math.PI)); limitedRotation = RotationUtils.limitAngleChange(RotationUtils.serverRotation, rotation, 20); RotationUtils.setTargetRotation(limitedRotation); //limitedRotation.toPlayer(mc.thePlayer); } -
I don't know what isn't clear to you.
Here is an example:
if (e.getEventState() == "PRE") { entity = getNearestTarget(EntityZombie); diffX = entity.posX - mc.thePlayer.posX; diffY = entity.posY - mc.thePlayer.posY; diffZ = entity.posZ - mc.thePlayer.posZ; rotation = new Rotation((Math.atan2(diffZ, diffX) * 180 / Math.PI) - 90, -(Math.atan2(diffY, Math.sqrt(diffX * diffX + diffZ * diffZ)) * 180 / Math.PI)); limitedRotation = RotationUtils.limitAngleChange(RotationUtils.serverRotation, rotation, 20); RotationUtils.setTargetRotation(limitedRotation); //limitedRotation.toPlayer(mc.thePlayer); }@CzechHek said in How to use LiquidBounce's rotations utils in a script?:
I don't know what isn't clear to you.
Here is an example:
if (e.getEventState() == "PRE") { entity = getNearestTarget(EntityZombie); diffX = entity.posX - mc.thePlayer.posX; diffY = entity.posY - mc.thePlayer.posY; diffZ = entity.posZ - mc.thePlayer.posZ; rotation = new Rotation((Math.atan2(diffZ, diffX) * 180 / Math.PI) - 90, -(Math.atan2(diffY, Math.sqrt(diffX * diffX + diffZ * diffZ)) * 180 / Math.PI)); limitedRotation = RotationUtils.limitAngleChange(RotationUtils.serverRotation, rotation, 20); RotationUtils.setTargetRotation(limitedRotation); //limitedRotation.toPlayer(mc.thePlayer); }If I understood properly, it should rotate at the closest zombie with a rotation speed of 20 max
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login