Package com.flansmod.common.vector

Examples of com.flansmod.common.vector.Vector3f.scale()


          }
         
          //Calculate the time interval spent post reflection
          float lambda = Math.abs(motVec.lengthSquared()) < 0.00000001F ? 1F : postHitMotVec.length() / motVec.length();
          //Scale the post hit motion by the bounciness of the grenade
          postHitMotVec.scale(type.bounciness / 2);
         
          //Move the grenade along the new path including reflection
          posX += preHitMotVec.x + postHitMotVec.x;
          posY += preHitMotVec.y + postHitMotVec.y;
          posZ += preHitMotVec.z + postHitMotVec.z;
View Full Code Here


      Vector3f dPos = ((Vector3f)Vector3f.sub(targetWheelPos, currentWheelPos, null).scale(getVehicleType().wheelSpringStrength));
       
      if(dPos.length() > 0.001F)
      {
        wheel.moveEntity(dPos.x, dPos.y, dPos.z);
        dPos.scale(0.5F);
        Vector3f.sub(amountToMoveCar, dPos, amountToMoveCar);
      }
    }
   
    moveEntity(amountToMoveCar.x, amountToMoveCar.y, amountToMoveCar.z);
View Full Code Here

          legAxes.rotateGlobalYaw(Math.min(angleBetween, type.rotateSpeed)*signBetween);
        }
       
        Vector3f motion = legAxes.getXAxis();
       
        motion.scale((type.moveSpeed * data.engine.engineSpeed * speedMultiplier())*(4.3F/20F)*(intent.lengthSquared()));
       
        boolean canThrustCreatively = seats != null && seats[0] != null && seats[0].riddenByEntity instanceof EntityPlayer && ((EntityPlayer)seats[0].riddenByEntity).capabilities.isCreativeMode;
 
        if((canThrustCreatively || data.fuelInTank > data.engine.fuelConsumption) && isPartIntact(EnumDriveablePart.hips))
        {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.