mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 23:17:02 +02:00
grab-point sphere is a child of controller joint, so it doesn't jitter
This commit is contained in:
parent
39f52b3682
commit
0783629cde
1 changed files with 9 additions and 9 deletions
|
@ -25,8 +25,8 @@ var WANT_DEBUG = false;
|
||||||
var WANT_DEBUG_STATE = false;
|
var WANT_DEBUG_STATE = false;
|
||||||
var WANT_DEBUG_SEARCH_NAME = null;
|
var WANT_DEBUG_SEARCH_NAME = null;
|
||||||
|
|
||||||
var FORCE_IGNORE_IK = false;
|
var FORCE_IGNORE_IK = true;
|
||||||
var SHOW_GRAB_POINT_SPHERE = false;
|
var SHOW_GRAB_POINT_SPHERE = true;
|
||||||
|
|
||||||
//
|
//
|
||||||
// these tune time-averaging and "on" value for analog trigger
|
// these tune time-averaging and "on" value for analog trigger
|
||||||
|
@ -833,12 +833,8 @@ function MyController(hand) {
|
||||||
if (!SHOW_GRAB_POINT_SPHERE) {
|
if (!SHOW_GRAB_POINT_SPHERE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var controllerLocation = this.getControllerLocation();
|
if (!this.grabPointSphere) {
|
||||||
if (this.grabPointSphere) {
|
var controllerLocation = this.getControllerLocation();
|
||||||
Overlays.editOverlay(this.grabPointSphere, {
|
|
||||||
position: controllerLocation.position
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.grabPointSphere = Overlays.addOverlay("sphere", {
|
this.grabPointSphere = Overlays.addOverlay("sphere", {
|
||||||
position: controllerLocation.position,
|
position: controllerLocation.position,
|
||||||
rotation: { x: 0, y: 0, z: 0, w: 1 },
|
rotation: { x: 0, y: 0, z: 0, w: 1 },
|
||||||
|
@ -848,7 +844,11 @@ function MyController(hand) {
|
||||||
solid: true,
|
solid: true,
|
||||||
visible: true,
|
visible: true,
|
||||||
ignoreRayIntersection: true,
|
ignoreRayIntersection: true,
|
||||||
drawInFront: false
|
drawInFront: false,
|
||||||
|
parentID: MyAvatar.sessionUUID,
|
||||||
|
parentJointIndex: MyAvatar.getJointIndex(this.hand === RIGHT_HAND ?
|
||||||
|
"Controller.Standard.RightHand" :
|
||||||
|
"Controller.Standard.LeftHand")
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue