-
Notifications
You must be signed in to change notification settings - Fork 5
Vehicle IK: Interactive elements
This page describes how interactive elements can be set up in models so that they can be used by Outerra engine. Multiple properties can be configured for proper action binding, for more info about action binding read "bin/defaults/iomap/readme.txt" located in outerra directory.
The control elements (control bones) are defined by setting custom attributes to a bone inside your 3D editor. The parameters used by Outerra are following:
"ot_controlbone_type" <string>
"ot_controlbone_action" <string>
"ot_controlbone_animation" <string>
- Select the bone you want to edit
- Select object rollout
- Add each property you want and set its value or use blender plugin https://github.com/Outerra/anteworld/tree/master/blender/2.80/ot_control_bones
- Select the bone you want to be defining
- Open: Animation -> Parameter Editor...
- Add each property you want
- Close the Parameter Editor
- The properties are now editable from the rollout
TODO
Format: type;[handles]
Example: "lever;door_handle_out,door_handle_in"
type: one of following
button //< pressed by an index finger
slider //< held by thumb and index
knob //< held by thumb, index and middle finger
lever //< held by whole hand
shaft //< held by whole hand
handles : comma separated list of bone names used as handles for this element
if defined: any bone defined in list can be interacted for handling current element
if not defined: current bone is used as handle
Format: action_name;[max velocity];[acceleration];[centering];[min value];[max value];[positions];[channels]
Example: vehicle/lights/main;5;1000;0;0;1;;
action_name:
action path from iomap definition
max velocity :
if defined: maximum velocity of value change
if not defined: default 1.0 is used
acceleration :
if defined: acceleration of value change
if not defined: instant acceleration is used
centering :
if defined: speed of value returning to 0.0
if not defined: default 0.5 is used
min value :
if defined: minimum value
if not defined: default -1.0 is used
max value :
if defined: maximum value
if not defined: default 1.0 is used
positions :
if defined: number of fixed positions between min and max values or 0 for continuous values
if positions == 1: object acts as button, after releasing, it returns to default position
if not defined: default 0 is used
channels :
if defined: number of extra channels supported by the handler
if not defined: default 0 is used
Format: type;[min];[max]
Example: "rX;-15;15"
type: one of following
rX //< rotation around bone's X axis
rY //< rotation around bone's Y axis
rZ //< rotation around bone's Z axis
tX //< translation in bone's X axis
tY //< translation in bone's Y axis
tZ //< translation in bone's Z axis
min : amount of transformation when action value is at it's minimum
if defined:
if type is rotation: value represents angle rotation in degrees
if type is translation: value represents movement in centimeters
if not defined: default value by table below is used
max : amount of transformation when action value is at it's maximum
if defined:
if type is rotation: value represents angle rotation in degrees
if type is translation: value represents movement in centimeters
if not defined: default value by table below is used
Bone representing button should have the Y axis in direction of button movement and Z axis in "up" direction (where fingernail should be oriented).
Example:
Bone representing slider should have the Y axis in direction towards slider and Z axis in "up" direction (where fingernail should be oriented).
Example:
Bone representing knob should have the Y axis in direction as axis of knob rotation and Z axis "up" direction (where index and middle fingernail should be oriented).
Example:
Bone representing lever should have the X axis in opposite direction as lever and Z axis in direction where palm should be located (Y axis then determine where fingers will be).
Note: usually lever control also defines "control_handles" property, as position where hand holds lever is different as point of rotation / translation.
Example:
Bone representing shaft should have the Z axis pointing out of them. Hand will "grab" the X axis.
Note: usually lever control also defines "control_handles" property, as position where hand holds lever is different as point of rotation / translation.
Example:
If "ot_controlbone_animation" is not defined, defaults by "ot_controlbone_type" are used.
| type | min | max
--------------------------------------------------
button | translate Y | 0 | 1
slider | translate X | -1 | 1
knob | rotate Y | -90 | 90
lever | rotate Z | -15 | 15
shaft | rotate X | -15 | 15
Test