Translations:45 Strafe/32/zh

From Minecraft Parkour Wiki
Revision as of 13:09, 26 August 2021 by Pjx1314 (talk | contribs) (Created page with "distance = movementFactor / distance; strafe = strafe * distance; forward = forward * distance; float sinYaw = MathHelper.sin(this.rotationYaw * Math.P...")
(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>