Package com.jme3.input
Interface SensorJoystickAxis
- All Known Implementing Classes:
AndroidSensorJoyInput.AndroidSensorJoystickAxis
public interface SensorJoystickAxis
Represents a joystick axis based on an external sensor
(i.e. Android Device Orientation sensors)
Sensor joystick axes can be calibrated to
set the zero position dynamically
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Calibrates the axis to the current value.float
Returns the current maximum raw sensor value that is being used to scale the joystick axis value.void
setMaxRawValue
(float maxRawValue) Method to allow users to set the raw sensor value that represents the maximum joystick axis value.
-
Field Details
-
ORIENTATION_X
- See Also:
-
ORIENTATION_Y
- See Also:
-
ORIENTATION_Z
- See Also:
-
-
Method Details
-
calibrateCenter
void calibrateCenter()Calibrates the axis to the current value. Future axis values will be sent as a delta from the calibration value. -
setMaxRawValue
void setMaxRawValue(float maxRawValue) Method to allow users to set the raw sensor value that represents the maximum joystick axis value. Values sent to InputManager are scaled using the maxRawValue.- Parameters:
maxRawValue
- Raw sensor value that will be used to scale joystick axis value
-
getMaxRawValue
float getMaxRawValue()Returns the current maximum raw sensor value that is being used to scale the joystick axis value.- Returns:
- maxRawValue The current maximum raw sensor value used for scaling the joystick axis value
-