mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
releaseGrab event now triggered for non physical entities
This commit is contained in:
parent
3bbc809710
commit
644687f330
1 changed files with 5 additions and 3 deletions
|
@ -29,7 +29,7 @@ var TRIGGER_ON_VALUE = 0.2;
|
|||
var DISTANCE_HOLDING_RADIUS_FACTOR = 5; // multiplied by distance between hand and object
|
||||
var DISTANCE_HOLDING_ACTION_TIMEFRAME = 0.1; // how quickly objects move to their new position
|
||||
var DISTANCE_HOLDING_ROTATION_EXAGGERATION_FACTOR = 2.0; // object rotates this much more than hand did
|
||||
var NO_INTERSECT_COLOR = { red: 10, green: 10, blue: 255 }; // line color when pick misses
|
||||
var NO_INTERSECT_COLOR = { red: 10, green: 10, blue: 255}; // line color when pick misses
|
||||
var INTERSECT_COLOR = { red: 250, green: 10, blue: 10}; // line color when pick hits
|
||||
var LINE_ENTITY_DIMENSIONS = { x: 1000, y: 1000, z: 1000};
|
||||
var LINE_LENGTH = 500;
|
||||
|
@ -502,8 +502,10 @@ function MyController(hand, triggerAction) {
|
|||
this.release = function() {
|
||||
this.lineOff();
|
||||
|
||||
if (this.grabbedEntity !== null && this.actionID !== null) {
|
||||
Entities.deleteAction(this.grabbedEntity, this.actionID);
|
||||
if (this.grabbedEntity !== null) {
|
||||
if(this.actionID !== null) {
|
||||
Entities.deleteAction(this.grabbedEntity, this.actionID);
|
||||
}
|
||||
Entities.callEntityMethod(this.grabbedEntity, "releaseGrab");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue