make trigger more sensitive, print out position and rotation when releasing something

This commit is contained in:
Seth Alves 2016-06-28 15:47:17 -07:00
parent 0f9f4749e7
commit 630d5cfc82

View file

@ -27,7 +27,7 @@ var WANT_DEBUG_SEARCH_NAME = null;
var TRIGGER_SMOOTH_RATIO = 0.1; // Time averaging of trigger - 0.0 disables smoothing
var TRIGGER_ON_VALUE = 0.4; // Squeezed just enough to activate search or near grab
var TRIGGER_GRAB_VALUE = 0.75; // Squeezed far enough to complete distant grab
var TRIGGER_GRAB_VALUE = 0.50; // Squeezed far enough to complete distant grab
var TRIGGER_OFF_VALUE = 0.15;
var BUMPER_ON_VALUE = 0.5;
@ -1994,6 +1994,12 @@ function MyController(hand) {
joint: this.hand === RIGHT_HAND ? "RightHand" : "LeftHand"
}));
grabbedProperties = Entities.getEntityProperties(this.grabbedEntity, ["localPosition", "localRotation"]);
print("adjusted position: " + vec3toStr(grabbedProperties.localPosition));
print("adjusted rotation: " + quatToStr(grabbedProperties.localRotation));
this.grabbedEntity = null;
if (this.triggerSmoothedGrab()) {