MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / AddAxisMap

Method AddAxisMap

src/InputManager.cpp:146–151  ·  view source on GitHub ↗

Define an axis mapping by name. If the mapping already exists, an additonal input is created for the mapping. Axis maps are called every frame regardless of value. @param name the string identifier for the mapping @param Id the input ID (scancode, etc) for the mapping @param scale the scalar to multiply against the axis value */

Source from the content-addressed store, hash-verified

144 @param scale the scalar to multiply against the axis value
145 */
146void InputManager::AddAxisMap(const std::string& name, int Id, float scale){
147
148 //add so that tick is aware of it
149 axisScalars[Id] = scale;
150 codeToAxis[Id].push_back(name);
151}
152
153/**
154Define an action mapping by name. If the mapping already exists, an additonal input is created for the mapping. The values of an action map may be 0 (off / released), or 1 (on / pressed). Action maps are called when they occur.

Callers 1

TestWorldMethod · 0.80

Calls 1

push_backMethod · 0.45

Tested by 1

TestWorldMethod · 0.64