Translations:45 Strafe/32/en

From Minecraft Parkour Wiki
Revision as of 12:53, 26 August 2021 by FuzzyBot (talk | contribs) (Importing a new version from external source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

distance = movementFactor / distance;

       strafe = strafe * distance;
       forward = forward * distance;
       float sinYaw = MathHelper.sin(this.rotationYaw * Math.PI / 180.0F);
       float cosYaw = MathHelper.cos(this.rotationYaw * Math.PI / 180.0F);
       this.motionX += strafe * cosYaw - forward * sinYaw;
       this.motionZ += forward * cosYaw + strafe * sinYaw;
   }

} </syntaxhighlight>