MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / input_controller_key

Function input_controller_key

StereoKitC/hands/input_hand.cpp:491–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

489///////////////////////////////////////////
490
491bool input_controller_key(handed_ hand, controller_key_ key, float *out_amount) {
492 *out_amount = 0;
493 switch (key) {
494 case controller_key_trigger: if (input_controllers[hand].trigger > 0.1f) { *out_amount = input_controllers[hand].trigger; return true; } else { return false; }
495 case controller_key_grip: if (input_controllers[hand].grip > 0.1f) { *out_amount = input_controllers[hand].grip; return true; } else { return false; }
496 case controller_key_menu: return (input_controller_menubtn & button_state_active) > 0;
497 case controller_key_stick: return (input_controllers[hand].stick_click & button_state_active) > 0;
498 case controller_key_x1: return (input_controllers[hand].x1 & button_state_active) > 0;
499 case controller_key_x2: return (input_controllers[hand].x2 & button_state_active) > 0;
500 default: return false;
501 }
502}
503///////////////////////////////////////////
504
505void input_hand_sim(handed_ handedness, bool center_on_finger, vec3 hand_pos, quat orientation, bool tracked) {

Callers 1

input_hand_simFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected