Torque 3D 3.8
ContentsIndexHome
PreviousUpNext
_ActionMapbind2 Function
Syntax
C++
static ConsoleDocFragment _ActionMapbind2("@brief Associates a function and input parameters to an input event.\n\n" "When the input event is raised, the specified function will be called. Modifier flags may be specified to process " "dead zones, input inversion, and more.\n\n" "Valid modifier flags:\n\n" " - R - Input is Ranged.\n" " - S - Input is Scaled.\n" " - I - Input is inverted.\n" " - D - Dead zone is present.\n" " - N - Input should be re-fit to a non-linear scale.\n\n" "@param device The input device, such as mouse or keyboard.\n" "@param action The input event, such as space, button0, etc.\n" "@param flag Modifier flag assigned during binding, letting event know there are additional parameters to consider. \n" "@param deadZone Restricted region in which device motion will not be acknowledged.\n" "@param scale Modifies the deadZone region.\n" "@param command The function bound to the action. Must take in a single argument.\n" "@return True if the binding was successful, false if the device was unknown or description failed.\n\n" "@tsexample\n" "// Simple function that adjusts the pitch of the camera based on the " "mouse's movement along the X axis.\n" "function testPitch(%val)\n" "{\n" " %pitchAdj = getMouseAdjustAmount(%val);\n" " $mvPitch += %pitchAdj;\n" "}\n\n" "// Bind the mouse's X axis to the testPitch function\n" "// DI is flagged, meaning input is inverted and has a deadzone\n" "%this.bind( mouse, \"xaxis\", \"DI\", \"-0.23 0.23\", testPitch );\n" "@endtsexample\n\n\n", "ActionMap", "bool bind( string device, string action, string flag, string deadZone, string scale, string command );");

This is function _ActionMapbind2.

Copyright (c) 2015. All rights reserved.
What do you think about this topic? Send feedback!