mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 02:17:11 +02:00
Only asking for needed props
This commit is contained in:
parent
b9db495ebf
commit
42a2125336
1 changed files with 2 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];
|
||||
|
|
Loading…
Reference in a new issue