24 lines
No EOL
860 B
JavaScript
24 lines
No EOL
860 B
JavaScript
var orientation = Camera.getOrientation();
|
|
orientation = Quat.safeEulerAngles(orientation);
|
|
orientation.x = 0;
|
|
orientation = Quat.fromVec3Degrees(orientation);
|
|
var center = Vec3.sum(MyAvatar.position, Vec3.multiply(3, Quat.getFront(orientation)));
|
|
center.x = center.x + 1;
|
|
center.y = center.y + 1;
|
|
var pos = Vec3.sum(MyAvatar.position,Quat.getFront(MyAvatar.orientation));
|
|
|
|
var SCRIPT_URL = Script.resolvePath("https://s3-us-west-1.amazonaws.com/hifi-content/ewing/production/cloudEntityScript.js" + Math.random());
|
|
var MODEL_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/Launch-Button.fbx";
|
|
var core = Entities.addEntity({
|
|
type: "Sphere",
|
|
name: "Core",
|
|
position: center,
|
|
visible: false,
|
|
script: SCRIPT_URL
|
|
});
|
|
|
|
function cleanup() {
|
|
Entities.deleteEntity(core);
|
|
};
|
|
|
|
Script.scriptEnding.connect(cleanup); |