mirror of
https://github.com/overte-org/overte.git
synced 2025-05-06 00:18:38 +02:00
19 lines
No EOL
475 B
JavaScript
19 lines
No EOL
475 B
JavaScript
var scriptURL = Script.resolvePath("masterResetEntity.js?v1" + Math.random());
|
|
|
|
var center = Vec3.sum(MyAvatar.position, Vec3.multiply(1, Quat.getFront(Camera.getOrientation())));
|
|
|
|
var resetEntity = Entities.addEntity({
|
|
type: "Box",
|
|
dimensions: {x: .3, y: 0.3, z: 0.3},
|
|
position: center,
|
|
color: {red: 100, green: 10, blue: 100},
|
|
script: scriptURL
|
|
});
|
|
|
|
|
|
|
|
function cleanup() {
|
|
Entities.deleteEntity(resetEntity);
|
|
}
|
|
|
|
Script.scriptEnding.connect(cleanup); |