content/hifi-public/cozza13/scripts/twoFallingEntities.js
Dale Glass 0d14e5a379 Initial data.
Needs a lot of cleanup. Data has been de-duplicated, and where identical copies existed, one of them
has been replaced with a symlink.

Some files have been excluded, such as binaries, installers and debug dumps. Some of that may still
be present.
2022-02-13 18:59:11 +01:00

25 lines
843 B
JavaScript

//
// twoFallingEntities.js
//
// Creates a red 0.2 meter diameter ball right in front of your avatar that lives for 60 seconds
//
var diameter = 0.2;
var position = Vec3.sum(MyAvatar.position, Quat.getFront(MyAvatar.orientation));
var properties = {
type: "Sphere",
position: position,
velocity: { x: 0, y: 0, z: 0},
gravity: { x: 0, y: -0.05, z: 0},
dimensions: { x: diameter, y: diameter, z: diameter };
damping: 0.00001,
color: { red: 200, green: 0, blue: 0 },
lifetime: 60
};
var newEntity = Entities.addEntity(properties);
position.x -= 0.5 * diameter;
properties.position = position;
var newEntityTwo = Entities.addEntity(properties);
Script.stop(); // no need to run anymore