Skip to content

Instantly share code, notes, and snippets.

@julik
Created July 14, 2009 03:46
Show Gist options
  • Save julik/146698 to your computer and use it in GitHub Desktop.
Save julik/146698 to your computer and use it in GitHub Desktop.
var throttleAxisForEngine = axisHandlerPerIndex("/controls/engines/engine[", "]/throttle");
var axisHandlerPerIndex = func(pre, post) {
func(idx = 0) {
var val = cmdarg().getNode("setting").getValue();
setprop(pre ~ idx ~ post, (1 - val) / 2);
}
}
var throttleAxisForEngine = axisHandlerPerIndex("/controls/engines/engine[", "]/throttle");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment