mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 05:50:19 +02:00
Rotate about translation grab position
This commit is contained in:
parent
e3f2f3c5bc
commit
d8d17be0e0
1 changed files with 5 additions and 0 deletions
|
@ -2298,6 +2298,11 @@ function MyController(hand) {
|
|||
this.getOtherHandController().currentObjectRotation = Quat.multiply(controllerRotationDelta,
|
||||
this.getOtherHandController().currentObjectRotation);
|
||||
|
||||
// Rotate about the translation controller's target position.
|
||||
this.offsetPosition = Vec3.multiplyQbyV(controllerRotationDelta, this.offsetPosition);
|
||||
this.getOtherHandController().offsetPosition = Vec3.multiplyQbyV(controllerRotationDelta,
|
||||
this.getOtherHandController().offsetPosition);
|
||||
|
||||
var rayPickInfo = this.calcRayPickInfo(this.hand);
|
||||
this.overlayLineOn(rayPickInfo.searchRay.origin, Vec3.subtract(grabbedProperties.position, this.offsetPosition),
|
||||
COLORS_GRAB_DISTANCE_HOLD);
|
||||
|
|
Loading…
Reference in a new issue