mirror of
https://github.com/overte-org/overte.git
synced 2025-04-18 07:56:25 +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
|
||||
//
|
||||
|
||||
var radius = 0.1;
|
||||
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},
|
||||
radius: radius,
|
||||
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 -= radius * 1.0;
|
||||
position.x -= 0.5 * diameter;
|
||||
properties.position = position;
|
||||
var newEntityTwo = Entities.addEntity(properties);
|
||||
|
||||
|
|
Loading…
Reference in a new issue