mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-09 12:23:56 +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",
|
||||
name: "Master Switch",
|
||||
script: hiddenEntityScriptURL,
|
||||
dimensions: {x: 0.7, y: 0.2, z: 0.1},
|
||||
position: {x: 543.9, y: 496.05, z: 502.43},
|
||||
dimensions: {
|
||||
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),
|
||||
visible: false
|
||||
visible: false,
|
||||
userData: JSON.stringify({
|
||||
grabbableKey: {
|
||||
wantsTrigger: true
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
var entities = Entities.findEntities(MyAvatar.position, 100);
|
||||
|
||||
entities.forEach(function(entity) {
|
||||
//params: customKey, id, defaultValue
|
||||
var name = Entities.getEntityProperties(entity, "name").name
|
||||
if (name === "Master Switch") {
|
||||
Entities.deleteEntity(entity);
|
||||
|
|
Loading…
Reference in a new issue