mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 02:52:57 +02:00
added new hydragrab script which works similarly to mouse grab script, and added header to hydraGrabHockey script
This commit is contained in:
parent
3393b60aba
commit
ebb590e58a
2 changed files with 276 additions and 710 deletions
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,21 @@
|
||||||
//same as hydraGrab script, but only x-z plane and no rotation
|
//
|
||||||
//Also tighter fall off force so can move puck faster
|
// hydraGrabHockey.js
|
||||||
|
// examples
|
||||||
|
//
|
||||||
|
// Created by Eric Levin on 5/14/15.
|
||||||
|
// Copyright 2015 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// This script allows you to grab and move physical objects with the hydra
|
||||||
|
// Same as hydraGrab.js, but you object movement is constrained to xz plane and cannot rotate object
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Using the hydras :
|
||||||
|
// grab physical entities with the right hydra trigger
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
var addedVelocity, newVelocity, angularVelocity, dT, cameraEntityDistance;
|
var addedVelocity, newVelocity, angularVelocity, dT, cameraEntityDistance;
|
||||||
var RIGHT = 1;
|
var RIGHT = 1;
|
||||||
|
@ -38,7 +54,6 @@ function getRayIntersection(pickRay) {
|
||||||
return intersection;
|
return intersection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function controller(side) {
|
function controller(side) {
|
||||||
this.triggerHeld = false;
|
this.triggerHeld = false;
|
||||||
this.triggerThreshold = 0.9;
|
this.triggerThreshold = 0.9;
|
||||||
|
|
Loading…
Reference in a new issue