mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 04:23:33 +02:00
Fix paint surface always facing the HMD instead of rotating with the
brush/hand;
This commit is contained in:
parent
1f5be31326
commit
f17221301a
1 changed files with 5 additions and 2 deletions
|
@ -78,7 +78,11 @@
|
|||
MAX_POINTS_PER_LINE = 70; // Hard-coded limit in PolyLineEntityItem.h.
|
||||
|
||||
function strokeNormal() {
|
||||
return Vec3.multiplyQbyV(Camera.getOrientation(), Vec3.UNIT_NEG_Z);
|
||||
var controllerPose = isLeftHandDominant
|
||||
? getControllerWorldLocation(Controller.Standard.LeftHand, true)
|
||||
: getControllerWorldLocation(Controller.Standard.RightHand, true);
|
||||
var fingerTipRotation = controllerPose.rotation;
|
||||
return Quat.getUp(fingerTipRotation);
|
||||
}
|
||||
|
||||
function changeStrokeColor(red, green, blue) {
|
||||
|
@ -564,7 +568,6 @@
|
|||
}
|
||||
updateTriggerPress();
|
||||
updateGripPress();
|
||||
|
||||
}
|
||||
|
||||
function setUp(onTriggerPressed, onTriggerPressing, onTriggerReleased, onGripPressed) {
|
||||
|
|
Loading…
Reference in a new issue