mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:48:38 +02:00
remove use of "radius" property for entities
use "dimensions" instead
This commit is contained in:
parent
0a8437a578
commit
278be3d31b
1 changed files with 3 additions and 3 deletions
|
@ -4,21 +4,21 @@
|
||||||
// Creates a red 0.2 meter diameter ball right in front of your avatar that lives for 60 seconds
|
// Creates a red 0.2 meter diameter ball right in front of your avatar that lives for 60 seconds
|
||||||
//
|
//
|
||||||
|
|
||||||
var radius = 0.1;
|
var diameter = 0.2;
|
||||||
var position = Vec3.sum(MyAvatar.position, Quat.getFront(MyAvatar.orientation));
|
var position = Vec3.sum(MyAvatar.position, Quat.getFront(MyAvatar.orientation));
|
||||||
var properties = {
|
var properties = {
|
||||||
type: "Sphere",
|
type: "Sphere",
|
||||||
position: position,
|
position: position,
|
||||||
velocity: { x: 0, y: 0, z: 0},
|
velocity: { x: 0, y: 0, z: 0},
|
||||||
gravity: { x: 0, y: -0.05, z: 0},
|
gravity: { x: 0, y: -0.05, z: 0},
|
||||||
radius: radius,
|
dimensions: { x: diameter, y: diameter, z: diameter };
|
||||||
damping: 0.00001,
|
damping: 0.00001,
|
||||||
color: { red: 200, green: 0, blue: 0 },
|
color: { red: 200, green: 0, blue: 0 },
|
||||||
lifetime: 60
|
lifetime: 60
|
||||||
};
|
};
|
||||||
|
|
||||||
var newEntity = Entities.addEntity(properties);
|
var newEntity = Entities.addEntity(properties);
|
||||||
position.x -= radius * 1.0;
|
position.x -= 0.5 * diameter;
|
||||||
properties.position = position;
|
properties.position = position;
|
||||||
var newEntityTwo = Entities.addEntity(properties);
|
var newEntityTwo = Entities.addEntity(properties);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue