Package com.ardorcraft.control
Class FlyControl
java.lang.Object
com.ardorcraft.control.FlyControl
-
Constructor Summary
ConstructorDescriptionFlyControl
(PlayerBase player, LogicalLayer layer, ReadOnlyVector3 upAxis, UprightFPSMoveConfig moveConfigParam) -
Method Summary
Modifier and TypeMethodDescriptionvoid
disable()
void
enable()
double
double
double
protected void
move
(TwoInputStates state, double tpf) static void
removeTriggers
(LogicalLayer layer, FlyControl control) Deregister the triggers of the given FlyControl from the given LogicalLayer.protected void
rotate
(double dx, double dy) void
setKeyRotateSpeed
(double speed) void
setMouseRotateSpeed
(double speed) void
setMoveSpeed
(double speed) void
setUpAxis
(ReadOnlyVector3 upAxis) void
setupMouseTriggers
(LogicalLayer layer, boolean dragOnly) static FlyControl
setupTriggers
(PlayerBase player, LogicalLayer layer, ReadOnlyVector3 upAxis, boolean dragOnly)
-
Constructor Details
-
FlyControl
public FlyControl(PlayerBase player, LogicalLayer layer, ReadOnlyVector3 upAxis, UprightFPSMoveConfig moveConfigParam)
-
-
Method Details
-
getUpAxis
-
setUpAxis
-
getMouseRotateSpeed
public double getMouseRotateSpeed() -
setMouseRotateSpeed
public void setMouseRotateSpeed(double speed) -
getMoveSpeed
public double getMoveSpeed() -
setMoveSpeed
public void setMoveSpeed(double speed) -
getKeyRotateSpeed
public double getKeyRotateSpeed() -
setKeyRotateSpeed
public void setKeyRotateSpeed(double speed) -
move
-
rotate
protected void rotate(double dx, double dy) -
setupTriggers
public static FlyControl setupTriggers(PlayerBase player, LogicalLayer layer, ReadOnlyVector3 upAxis, boolean dragOnly) - Parameters:
player
- the playerlayer
- the logical layer to register withupAxis
- the up axis of the cameradragOnly
- if true, mouse input will only rotate the camera if one of the mouse buttons (left, center or right) is down.- Returns:
- a new FlyControl object
-
removeTriggers
Deregister the triggers of the given FlyControl from the given LogicalLayer.- Parameters:
layer
- the logical layer to deregistercontrol
- the FlyControl
-
setupMouseTriggers
-
setupKeyboardTriggers
-
getKeyTrigger
-
getMouseTrigger
-
enable
public void enable() -
disable
public void disable()
-