mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-15 07:15:01 +02:00
updated grab script
This commit is contained in:
parent
a0bf7b6529
commit
a28cf5ce8b
2 changed files with 1 additions and 2 deletions
|
@ -221,7 +221,7 @@ function controller(hand, triggerAction) {
|
|||
var minDistance = GRAB_RADIUS;
|
||||
var grabbedEntity = null;
|
||||
for (var i = 0; i < nearbyEntities.length; i++) {
|
||||
var props = Entities.getEntityProperties(nearbyEntities[i]);
|
||||
var props = Entities.getEntityProperties(nearbyEntities[i], ["position", "name", "collisionsWillMove", "locked"]);
|
||||
var distance = Vec3.distance(props.position, handPosition);
|
||||
if (distance < minDistance && props.name !== "pointer") {
|
||||
this.grabbedEntity = nearbyEntities[i];
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
|
||||
|
||||
startNearGrab: function() {
|
||||
print("START GRAB")
|
||||
Entities.editEntity(this.entityID, {
|
||||
animationURL: "https://hifi-public.s3.amazonaws.com/models/Bboys/zombie_scream.fbx",
|
||||
animationSettings: this.startAnimationSetting
|
||||
|
|
Loading…
Reference in a new issue