private void FireDashJets(Mech mech) { if (fuel < Type.FuelUsage) return; fuel -= Type.FuelUsage; Vec3 vel = mech.PhysicsModel.GetBody("mainBody").Rotation.GetForward(); vel = vel.GetNormalize() * Type.Velocity; mech.PhysicsModel.GetBody("mainBody").LinearVelocity = vel; }
private void FireFlyJets(Mech mech) { if (fuel < Type.FuelUsage || !keepFlying) { keepFlying = false; return; } fuel -= Type.FuelUsage; Vec3 vel = mech.MainGun.Rotation.GetForward(); vel = vel.GetNormalize() * Type.Velocity; //mech.PhysicsModel.Bodies[0].LinearVelocity = vel; mech.PhysicsModel.Bodies[0].AddForce(ForceType.GlobalAtLocalPos, 0, 1000f * vel, Position); }
private void FireJumpJets(Mech mech) { //mech.PhysicsModel.Bodies[0].AddForce(ForceType.GlobalAtGlobalPos, TickDelta, Vec3.ZAxis*Type.Force, mech.Position); //mech.PhysicsModel.Bodies[0].AddForce(ForceType.GlobalAtGlobalPos, TickDelta, Vec3.ZAxis * 2500f, mech.Position); if (fuel < Type.Fuel) return; fuel = 0f; Vec3 vel = mech.PhysicsModel.Bodies[0].LinearVelocity; vel.Z = Type.Velocity; mech.PhysicsModel.Bodies[0].LinearVelocity = vel; }