*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 3 of the GNU Lesser General Public License
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 3 of the GNU Lesser General Public License
public static final double SPEED_LIMIT = 30;
/**
* Just in case we want to adjust global speed for some reason.
*/
private static final double SPEED_MULTIPLIER = .02d;
public static final double SPEED_LIMIT = 30;
/**
* Just in case we want to adjust global speed for some reason.
*/
private static final double SPEED_MULTIPLIER = .02d;
/**
* Avatar movement speed, relative to avatar itself. When avatar coordinates
* are updated within the world, avatar orientation relative to the world is
/**
* Avatar movement speed, relative to avatar itself. When avatar coordinates
* are updated within the world, avatar orientation relative to the world is
/**
* Avatar orientation on the Y-Z plane. It changes when looking up or down.
*/
private double orientationYZ;
/**
* Avatar orientation on the Y-Z plane. It changes when looking up or down.
*/
private double orientationYZ;
applyFrictionToUserMovement(millisecondsSinceLastFrame);
return isFrameRepaintNeeded(locationBeforeUpdate);
}
applyFrictionToUserMovement(millisecondsSinceLastFrame);
return isFrameRepaintNeeded(locationBeforeUpdate);
}
* Therefore we take frame rendering time into account when translating
* avatar between consecutive frames.
*/
* Therefore we take frame rendering time into account when translating
* avatar between consecutive frames.
*/
location.x -= (float) sin(getAngleXZ())
* getMovementVector().z * SPEED_MULTIPLIER
* millisecondsPassedSinceLastFrame;
location.x -= (float) sin(getAngleXZ())
* getMovementVector().z * SPEED_MULTIPLIER
* millisecondsPassedSinceLastFrame;