You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steamworks-rs supports some functions that I'd really like, such as "get_glyph_for_action_origin", "get_motion_data", "show_binding_panel", "run_frame", etc. They're not in steamworks.js though, and that's a shame. I wasted about 3 days trying to get steamworks-node to work, to no avail either.
I'll try and implement them myself, but I know next to nothing about Rust. It'd be great to have official support for this.
The text was updated successfully, but these errors were encountered:
+1, I'd also be very interested in GetDigitalActionHandle and GetAnalogActionHandle, since as I understand it the respective funcitons without Handle expect bigints that can only be queried with those.
edit: nvm, I figured it out.
const client = steamworks.init(<appID>);
client.input.init();
// query the IDs (bigints) the steamworks sdk assigns to your game actions
// action strings are the keys of the actions defined in <Steam Install Path>\controller_config\game_actions_<appID>.vdf
const jump = client.input.getDigitalAction('jump');
const move = client.input.getAnalogAction('move');
// replace setInterval with Ipc polls or query them directly in your requestAnimationFrame-Loop if you enabled native modules in renderer thread
setInterval(() => {
client.input.getControllers().forEach((controller) => {
// query the input state of your actions using the previously queried action IDs
console.log(controller.isDigitalActionPressed(jump)); // true | false
console.log(controller.getAnalogActionVector(move)); // {x: int, y: int}
});
}, 1000);
Steamworks-rs supports some functions that I'd really like, such as "get_glyph_for_action_origin", "get_motion_data", "show_binding_panel", "run_frame", etc. They're not in steamworks.js though, and that's a shame. I wasted about 3 days trying to get steamworks-node to work, to no avail either.
I'll try and implement them myself, but I know next to nothing about Rust. It'd be great to have official support for this.
The text was updated successfully, but these errors were encountered: