Package org.terasology.logic.characters

Examples of org.terasology.logic.characters.CharacterMoveInputEvent


        targetDirection.sub(ai.movementTarget, worldPos);
        targetDirection.normalize();
        drive.set(targetDirection);

        float yaw = (float) Math.atan2(targetDirection.x, targetDirection.z);
        entity.send(new CharacterMoveInputEvent(0, 0, yaw, drive, false, false));
        entity.saveComponent(location);
        // System.out.print("\Destination set: " + targetDirection.x + ":" +targetDirection.z + "\n");
        // System.out.print("\nI am: " + worldPos.x + ":" + worldPos.z + "\n");

        ai.lastProgressedUpdateAt = CoreRegistry.get(Time.class).getGameTimeInMs();
View Full Code Here


                float yaw = (float) Math.atan2(targetDirection.x, targetDirection.z);
                AxisAngle4f axisAngle = new AxisAngle4f(0, 1, 0, yaw);
                location.getLocalRotation().set(axisAngle);
                entity.saveComponent(location);
            }
            entity.send(new CharacterMoveInputEvent(0, 0, 0, drive, false, false));
        }
    }
View Full Code Here

                QuaternionUtil.setEuler(viewRot, TeraMath.DEG_TO_RAD * characterComponent.yaw, TeraMath.DEG_TO_RAD * characterComponent.pitch, 0);
                QuaternionUtil.quatRotate(viewRot, relMove, relMove);
                relMove.y += relativeMovement.y;
                break;
        }
        entity.send(new CharacterMoveInputEvent(inputSequenceNumber++, lookPitch, lookYaw, relMove, run, jump));
        jump = false;
    }
View Full Code Here

TOP

Related Classes of org.terasology.logic.characters.CharacterMoveInputEvent

Copyright © 2018 www.massapicom. 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.