mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 04:03:35 +02:00
entity reset switch can be triggered again with hand controller
This commit is contained in:
parent
0980dbed60
commit
d202ccb29c
1 changed files with 16 additions and 4 deletions
|
@ -20,17 +20,29 @@ function createHiddenMasterSwitch() {
|
||||||
type: "Box",
|
type: "Box",
|
||||||
name: "Master Switch",
|
name: "Master Switch",
|
||||||
script: hiddenEntityScriptURL,
|
script: hiddenEntityScriptURL,
|
||||||
dimensions: {x: 0.7, y: 0.2, z: 0.1},
|
dimensions: {
|
||||||
position: {x: 543.9, y: 496.05, z: 502.43},
|
x: 0.7,
|
||||||
|
y: 0.2,
|
||||||
|
z: 0.1
|
||||||
|
},
|
||||||
|
position: {
|
||||||
|
x: 543.9,
|
||||||
|
y: 496.05,
|
||||||
|
z: 502.43
|
||||||
|
},
|
||||||
rotation: Quat.fromPitchYawRollDegrees(0, 33, 0),
|
rotation: Quat.fromPitchYawRollDegrees(0, 33, 0),
|
||||||
visible: false
|
visible: false,
|
||||||
|
userData: JSON.stringify({
|
||||||
|
grabbableKey: {
|
||||||
|
wantsTrigger: true
|
||||||
|
}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var entities = Entities.findEntities(MyAvatar.position, 100);
|
var entities = Entities.findEntities(MyAvatar.position, 100);
|
||||||
|
|
||||||
entities.forEach(function(entity) {
|
entities.forEach(function(entity) {
|
||||||
//params: customKey, id, defaultValue
|
|
||||||
var name = Entities.getEntityProperties(entity, "name").name
|
var name = Entities.getEntityProperties(entity, "name").name
|
||||||
if (name === "Master Switch") {
|
if (name === "Master Switch") {
|
||||||
Entities.deleteEntity(entity);
|
Entities.deleteEntity(entity);
|
||||||
|
|
Loading…
Reference in a new issue