mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 15:23:05 +02:00
try to fix far-trigger
This commit is contained in:
parent
53ba190ca6
commit
a35e527128
1 changed files with 3 additions and 4 deletions
|
@ -2044,7 +2044,7 @@ function MyController(hand) {
|
||||||
var props = Entities.getEntityProperties(this.grabbedEntity, ["localPosition", "parentID",
|
var props = Entities.getEntityProperties(this.grabbedEntity, ["localPosition", "parentID",
|
||||||
"position", "rotation", "dimensions"]);
|
"position", "rotation", "dimensions"]);
|
||||||
if (!props.position) {
|
if (!props.position) {
|
||||||
// server may have reset, taking our equipped entity with it. move back to "off" stte
|
// server may have reset, taking our equipped entity with it. move back to "off" state
|
||||||
this.callEntityMethodOnGrabbed("releaseGrab");
|
this.callEntityMethodOnGrabbed("releaseGrab");
|
||||||
this.setState(STATE_OFF, "entity has no position property");
|
this.setState(STATE_OFF, "entity has no position property");
|
||||||
return;
|
return;
|
||||||
|
@ -2175,10 +2175,9 @@ function MyController(hand) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var handPosition = this.getHandPosition();
|
|
||||||
var pickRay = {
|
var pickRay = {
|
||||||
origin: handPosition,
|
origin: this.getControllerLocation().position,
|
||||||
direction: Quat.getUp(this.getControllerRotation())
|
direction: Quat.getUp(this.getControllerLocation().orientation)
|
||||||
};
|
};
|
||||||
|
|
||||||
var now = Date.now();
|
var now = Date.now();
|
||||||
|
|
Loading…
Reference in a new issue