rotation fix

This commit is contained in:
ericrius1 2015-12-21 11:00:10 -08:00
parent 45ba7a3d35
commit 48ab99c348
2 changed files with 63 additions and 57 deletions

View file

@ -31,7 +31,7 @@ ArcBall = function(spawnPosition) {
script: scriptURL,
position: Vec3.sum(spawnPosition, {
x: 0,
y: .5,
y: .7,
z: 0
}),
dimensions: {
@ -51,8 +51,8 @@ ArcBall = function(spawnPosition) {
spatialKey: {
relativePosition: {
x: 0,
y: 0,
z: -0.5
y: -0.5,
z: 0.0
},
},
invertSolidWhileHeld: true
@ -97,7 +97,7 @@ ArcBall = function(spawnPosition) {
},
maxParticles: 100000,
lifespan: 2,
emitRate: 1000,
emitRate: 400,
emitSpeed: .1,
lifetime: -1,
speedSpread: 0.0,

View file

@ -14,6 +14,15 @@
var _this;
var ArcBall = function() {
_this = this;
this.colorPalette = [{
red: 25,
green: 20,
blue: 162
}, {
red: 200,
green: 10,
blue: 10
}];
};
ArcBall.prototype = {
@ -40,59 +49,56 @@
emitOrientation = Quat.multiply(Quat.inverse(rotation), emitOrientation);
var color = {
red: 200,
green: 10,
blue: 10
};
var props = {
type: "ParticleEffect",
name: "Particle Arc",
parentID: this.entityID,
parentJointIndex: -1,
// position: startPosition,
isEmitting: true,
colorStart: color,
color: {
red: 200,
green: 200,
blue: 255
},
colorFinish: color,
maxParticles: 100000,
lifespan: 5,
emitRate: 1000,
emitOrientation: emitOrientation,
emitSpeed: .4,
speedSpread: 0.0,
emitDimensions: {
x: 0,
y: 0,
z: 0
},
polarStart: 0,
polarFinish: .0,
azimuthStart: .1,
azimuthFinish: .01,
emitAcceleration: {
x: 0,
y: 0,
z: 0
},
accelerationSpread: {
x: .00,
y: .00,
z: .00
},
radiusStart: 0.03,
adiusFinish: 0.025,
alpha: 0.7,
alphaSpread: .1,
alphaStart: 0.5,
alphaFinish: 0.5,
textures: "https://s3.amazonaws.com/hifi-public/eric/textures/particleSprites/beamParticle.png",
emitterShouldTrail: true
}
var color = this.colorPalette[randInt(0, this.colorPalette.length)];
var props = {
type: "ParticleEffect",
name: "Particle Arc",
parentID: this.entityID,
parentJointIndex: -1,
// position: startPosition,
isEmitting: true,
colorStart: color,
color: {
red: 200,
green: 200,
blue: 255
},
colorFinish: color,
maxParticles: 100000,
lifespan: 2,
emitRate: 500,
emitOrientation: emitOrientation,
emitSpeed: .4,
speedSpread: 0.1,
emitDimensions: {
x: 0,
y: 0,
z: 0
},
polarStart: 0,
polarFinish: .0,
azimuthStart: .1,
azimuthFinish: .01,
emitAcceleration: {
x: 0,
y: 0,
z: 0
},
accelerationSpread: {
x: .00,
y: .00,
z: .00
},
radiusStart: 0.03,
radiusFinish: 0.025,
radiusSpread: .01,
alpha: 0.7,
alphaSpread: .1,
alphaStart: 0.5,
alphaFinish: 0.5,
textures: "https://s3.amazonaws.com/hifi-public/eric/textures/particleSprites/beamParticle.png",
emitterShouldTrail: true
}
this.particleArc = Entities.addEntity(props);
},