Class: AxWalkInputModel

AxWalkInputModel(context, transform, moveSpeed, moveResponsiveness, turnSpeed, turnResponsiveness, forwardInput, backwardInput, leftInput, rightInput, upInput, downInput, moveConditionInput, turnUpInput, turnDownInput, turnLeftInput, turnRightInput, turnConditionInput)

new AxWalkInputModel(context, transform, moveSpeed, moveResponsiveness, turnSpeed, turnResponsiveness, forwardInput, backwardInput, leftInput, rightInput, upInput, downInput, moveConditionInput, turnUpInput, turnDownInput, turnLeftInput, turnRightInput, turnConditionInput)

Creates an input model, providing a walk-like manipulation on a given transform The walk model assumes a well defined "vertical" orientation and in contrast to the fly model, it always turns around this fixed vertical axis. This model assumes Y as the vertical axis. For example, a person walking on the ground would always turn around the orientation of the gravity vector (which is generally perpendicular to the ground) no matter whether that person is facing the horizon or the sky or the ground. In contrast, in a free flight model, where there are no fixed directions, an analogical turning would be around the viewer's own vertical axis, which would be oriented differently if the viewer is facing the horizon, the sky or the ground. For multiple alternative inputs on the same control, enumerate all the input names, separated by comma. Both digital and analog inputs are acceptable, such as keyboard, mouse, gamepad buttons as well as mouse coordinates and gamepad thumbsticks and triggers For analog inputs, which provide positive and negative values, only one of two opposing controls is required. For example, when using the mouse to turn left and right, only the left or only the right control is sufficient in this case, because a negative value from the input would reverse the turning direction. The model provides inputs to serve as conditions for moving and turning. If these inputs are provided, moving and turning respectively will only occur if the given conditional input is active. For example, to turn by moving the mouse, but only while mouse button is pressed, the mouse button must be provided as conditional input.
Parameters:
Name Type Description
context Axis The instance of Axis, to which the model will be applied
transform AxTransform The transform for which to perform the manipulation of the input model
moveSpeed Number The speed multiplier in units per second per input at which to move
moveResponsiveness Number The moving responsiveness, where 0 is no responsiveness at all and greater values result in a more responsive movement. Smaller values result in a more inert moving. Must be greater than 0 in order for any movement to occur
turnSpeed Number The turning speed multiplier in turns per second per input at which to rotate
turnResponsiveness Number The turning responsiveness, where 0 is no responsiveness at all and greater values result in a more responsive turning. Smaller values result in a more inert turning. Must be greater than 0 in order for any movement to occur
forwardInput String | AxString Names of the inputs to control the forward movement. Passing a null or empty string value would discard the control.
backwardInput String | AxString Names of the inputs to control the backward movement. Passing a null or empty string value would discard the control.
leftInput String | AxString Names of the inputs to control the left movement. Passing a null or empty string value would discard the control.
rightInput String | AxString Names of the inputs to control the right movement. Passing a null or empty string value would discard the control.
upInput String | AxString Names of the inputs to control the up movement. Passing a null or empty string value would discard the control.
downInput String | AxString Names of the inputs to control the down movement. Passing a null or empty string value would discard the control.
moveConditionInput String | AxString Names of the inputs to serve as a condition for allowing movement. Passing a null or empty string value would discard the condition.
turnUpInput String | AxString Names of the inputs to control turning up. Passing a null or empty string value would discard the control.
turnDownInput String | AxString Names of the inputs to control turning down. Passing a null or empty string value would discard the control.
turnLeftInput String | AxString Names of the inputs to control turning to the left. Passing a null or empty string value would discard the control.
turnRightInput String | AxString Names of the inputs to control turning to the right. Passing a null or empty string value would discard the control.
turnConditionInput String | AxString Names of the inputs to serve as a condition for allowing turning. Passing a null or empty string value would discard the condition.
Source:

Methods

Process()

Performs the input model routines
Source:

Documentation generated by JSDoc 3.5.3 on Wed Jan 17 2018 17:06:57 GMT+0200 (FLE Standard Time)