Skip to content

Instantly share code, notes, and snippets.

@hyperlogic
Last active April 28, 2016 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyperlogic/d1fc09da90e7b29da146c2ac658e5911 to your computer and use it in GitHub Desktop.
Save hyperlogic/d1fc09da90e7b29da146c2ac658e5911 to your computer and use it in GitHub Desktop.
High Fidelity script to disable foot IK on your avatar.
var ikTypes = {
RotationAndPosition: 0,
RotationOnly: 1,
HmdHead: 2,
HipsRelativeRotationAndPosition: 3,
Off: 4
};
function animStateHandler(props) {
return { leftFootType: ikTypes["Off"],
rightFootType: ikTypes["Off"] };
}
function init() {
Script.update.connect(update);
MyAvatar.addAnimationStateHandler(animStateHandler, ["leftFootType", "rightFootType"]);
}
function update(dt) {
;
}
function shutdown() {
Script.update.disconnect(update);
MyAvatar.removeAnimationStateHandler(animStateHandler);
}
Script.scriptEnding.connect(shutdown);
init();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment