mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:37:51 +02:00
make targets ungrabbable
This commit is contained in:
parent
bc4200d8d7
commit
02620c4b0d
3 changed files with 1233 additions and 1222 deletions
|
@ -111,7 +111,7 @@ function testTargetDistanceFromStart() {
|
||||||
|
|
||||||
lastPositions[index] = currentPosition;
|
lastPositions[index] = currentPosition;
|
||||||
|
|
||||||
if (length > RESET_DISTANCE && moving<MINIMUM_MOVE_LENGTH) {
|
if (length > RESET_DISTANCE && moving < MINIMUM_MOVE_LENGTH) {
|
||||||
|
|
||||||
Entities.deleteEntity(target);
|
Entities.deleteEntity(target);
|
||||||
|
|
||||||
|
@ -125,7 +125,12 @@ function testTargetDistanceFromStart() {
|
||||||
compoundShapeURL: COLLISION_HULL_URL,
|
compoundShapeURL: COLLISION_HULL_URL,
|
||||||
position: originalPositions[index],
|
position: originalPositions[index],
|
||||||
rotation: rotation,
|
rotation: rotation,
|
||||||
script: scriptURL
|
script: scriptURL,
|
||||||
|
userData: JSON.stringify({
|
||||||
|
grabbableKey: {
|
||||||
|
grabbable: false
|
||||||
|
}
|
||||||
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
targets[index] = Entities.addEntity(targetProperties);
|
targets[index] = Entities.addEntity(targetProperties);
|
||||||
|
|
|
@ -413,6 +413,9 @@
|
||||||
userData: JSON.stringify({
|
userData: JSON.stringify({
|
||||||
resetMe: {
|
resetMe: {
|
||||||
resetMe: true
|
resetMe: true
|
||||||
|
},
|
||||||
|
grabbableKey: {
|
||||||
|
grabbable: false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
@ -438,9 +441,9 @@
|
||||||
var position = Vec3.sum(startPosition, multiplier);
|
var position = Vec3.sum(startPosition, multiplier);
|
||||||
position.y = startPosition.y - (row * VERTICAL_SPACING);
|
position.y = startPosition.y - (row * VERTICAL_SPACING);
|
||||||
|
|
||||||
originalPositions.push(position);
|
originalPositions.push(position);
|
||||||
lastPositions.push(position);
|
lastPositions.push(position);
|
||||||
|
|
||||||
var targetProperties = {
|
var targetProperties = {
|
||||||
name: 'Target',
|
name: 'Target',
|
||||||
type: 'Model',
|
type: 'Model',
|
||||||
|
@ -455,7 +458,7 @@
|
||||||
userData: JSON.stringify({
|
userData: JSON.stringify({
|
||||||
resetMe: {
|
resetMe: {
|
||||||
resetMe: true
|
resetMe: true
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
var target = Entities.addEntity(targetProperties);
|
var target = Entities.addEntity(targetProperties);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue