mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
don't allow scaling of others' equipped entities
This commit is contained in:
parent
ad1235ce94
commit
b2f25629eb
1 changed files with 4 additions and 1 deletions
|
@ -7,7 +7,7 @@
|
|||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
/* global Script, Vec3, MyAvatar, Entities, RIGHT_HAND */
|
||||
/* global Script, Vec3, MyAvatar, Entities, RIGHT_HAND, entityIsGrabbable */
|
||||
|
||||
(function() {
|
||||
var dispatcherUtils = Script.require("/~/system/libraries/controllerDispatcherUtils.js");
|
||||
|
@ -62,6 +62,9 @@
|
|||
var otherHandTargetProps = otherModule.getTargetProps(controllerData);
|
||||
if (thisHandTargetProps && otherHandTargetProps) {
|
||||
if (thisHandTargetProps.id === otherHandTargetProps.id) {
|
||||
if (!entityIsGrabbable(thisHandTargetProps)) {
|
||||
return dispatcherUtils.makeRunningValues(false, [], []);
|
||||
}
|
||||
this.grabbedThingID = thisHandTargetProps.id;
|
||||
this.scalingStartDistance =
|
||||
Vec3.length(Vec3.subtract(controllerData.controllerLocations[this.hand].position,
|
||||
|
|
Loading…
Reference in a new issue