Skip to content

Instantly share code, notes, and snippets.

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