Examples of Quaternionf


Examples of org.spout.math.imaginary.Quaternionf

    String action = args.popString("action");
    Player player = args.popPlayerOrMe("player", source);
    args.assertCompletelyParsed();

    if (action.contains("look")) {
      Quaternionf rotation = player.getData().get(VanillaData.HEAD_ROTATION);
      Point startPosition = player.getPhysics().getPosition();
      Vector3f offset = rotation.getDirection().mul(0.1);
      for (int i = 0; i < 100; i++) {
        startPosition = startPosition.add(offset);
        GeneralEffects.NOTE_PARTICLE.playGlobal(startPosition);
      }
      final Vector3f axesAngles = rotation.getAxesAngleDeg();
      player.sendMessage("Yaw = " + axesAngles.getY());
      player.sendMessage("Pitch = " + axesAngles.getX());
    } else if (action.contains("packets")) {
      player.add(ForceMessages.class);
    } else {
View Full Code Here

Examples of org.spout.math.imaginary.Quaternionf

      PlayerSpawnPositionMessage pspMsg = new PlayerSpawnPositionMessage((int) live.getPosition().getX(), (int) live.getPosition().getY(), (int) live.getPosition().getZ(), getRepositionManager());
      event.getMessages().add(pspMsg);
      first = false;
    }
    Point p = event.getTransform().getPosition();
    Quaternionf rot = event.getTransform().getRotation();
    final Vector3f axesAngles = rot.getAxesAngleDeg();
    PlayerPositionLookMessage PPLMsg = new PlayerPositionLookMessage(p.getX(), p.getY() + STANCE, p.getZ(), p.getY(), axesAngles.getY(), axesAngles.getX(), true, VanillaBlockDataChannelMessage.CHANNEL_ID, getRepositionManager());
    event.getMessages().add(PPLMsg);
  }
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.