From f7b34f63c10d732bc8f06e87c5bfb97f23904ea1 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Tue, 29 Sep 2015 13:40:54 -0700 Subject: [PATCH] try calling updateMotionBehaviorFromMenu --- examples/controllers/handControllerGrab.js | 4 ++++ interface/src/avatar/MyAvatar.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/controllers/handControllerGrab.js b/examples/controllers/handControllerGrab.js index 0b9e609c77..4339c92f28 100644 --- a/examples/controllers/handControllerGrab.js +++ b/examples/controllers/handControllerGrab.js @@ -247,6 +247,8 @@ function MyController(hand, triggerAction) { this.previousAvCollision = Menu.isOptionChecked("Enable avatar collisions"); Menu.setIsOptionChecked("Enable avatar collisions", false); + MyAvatar.updateMotionBehaviorFromMenu(); + var handControllerPosition = Controller.getSpatialControlPosition(this.palm); var handRotation = Quat.multiply(MyAvatar.orientation, Controller.getSpatialControlRawRotation(this.palm)); @@ -330,6 +332,7 @@ function MyController(hand, triggerAction) { this.previousAvCollision = Menu.isOptionChecked("Enable avatar collisions"); Menu.setIsOptionChecked("Enable avatar collisions", false); + MyAvatar.updateMotionBehaviorFromMenu(); if (!this.triggerSmoothedSqueezed()) { this.state = STATE_RELEASE; @@ -501,6 +504,7 @@ function MyController(hand, triggerAction) { this.release = function() { Menu.setIsOptionChecked("Enable avatar collisions", this.previousAvCollision); + MyAvatar.updateMotionBehaviorFromMenu(); this.lineOff(); diff --git a/interface/src/avatar/MyAvatar.h b/interface/src/avatar/MyAvatar.h index bbc0667015..6efec3be13 100644 --- a/interface/src/avatar/MyAvatar.h +++ b/interface/src/avatar/MyAvatar.h @@ -193,7 +193,7 @@ public slots: glm::vec3 getThrust() { return _thrust; }; void setThrust(glm::vec3 newThrust) { _thrust = newThrust; } - void updateMotionBehaviorFromMenu(); + Q_INVOKABLE void updateMotionBehaviorFromMenu(); glm::vec3 getLeftPalmPosition(); glm::vec3 getLeftPalmVelocity();