Class PhysicsMovementPlanner


  • public final class PhysicsMovementPlanner
    extends java.lang.Object
    Simulates cursor motion step by step at 125 Hz.

    Each 8ms step updates speed and heading: speed rises toward a target magnitude, the heading turns toward the target by at most dTheta, and speed falls off exponentially inside the deceleration radius. A fixed spline through control points would produce the same shape for every movement; this does not.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      MousePath plan​(net.runelite.api.Point from, net.runelite.api.Point to, java.awt.Rectangle targetBounds, int speedSetting)  
      MousePath planDrag​(net.runelite.api.Point from, net.runelite.api.Point to, int speedSetting)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PhysicsMovementPlanner

        public PhysicsMovementPlanner​(MouseProfile profile,
                                      java.util.Random random)
    • Method Detail

      • plan

        public MousePath plan​(net.runelite.api.Point from,
                              net.runelite.api.Point to,
                              java.awt.Rectangle targetBounds,
                              int speedSetting)
      • planDrag

        public MousePath planDrag​(net.runelite.api.Point from,
                                  net.runelite.api.Point to,
                                  int speedSetting)