Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

LiquidBounce Forum

  1. Home
  2. ScriptAPI
  3. How to use LiquidBounce's rotations utils in a script?

How to use LiquidBounce's rotations utils in a script?

Scheduled Pinned Locked Moved ScriptAPI
3 Posts 2 Posters 532 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • yorik100Y Offline
    yorik100Y Offline
    yorik100
    wrote on last edited by
    #1

    Please tell me, thank you!

    1 Reply Last reply
    0
    • CzechHekC Offline
      CzechHekC Offline
      CzechHek
      wrote on last edited by CzechHek
      #2

      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);
              }
      
      yorik100Y 1 Reply Last reply
      0
      • CzechHekC CzechHek

        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);
                }
        
        yorik100Y Offline
        yorik100Y Offline
        yorik100
        wrote on last edited by
        #3

        @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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        About
        • Terms of Service
        • Privacy Policy
        • Status
        • Contact Us
        Downloads
        • Releases
        • Source code
        • License
        Docs
        • Tutorials
        • CustomHUD
        • AutoSettings
        • ScriptAPI
        Community
        • Forum
        • Guilded
        • YouTube
        • Twitter
        • D.Tube
        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups