wave beam balance

This commit is contained in:
landgreen
2019-09-09 06:44:29 -07:00
parent 9e945f04be
commit 8ec8a65691

View File

@@ -913,7 +913,7 @@ const b = {
inertia: Infinity, inertia: Infinity,
frictionAir: 0, frictionAir: 0,
minDmgSpeed: 0, minDmgSpeed: 0,
dmg: 0.1, //damage done in addition to the damage from momentum dmg: 0.11, //damage done in addition to the damage from momentum
classType: "bullet", classType: "bullet",
collisionFilter: { collisionFilter: {
category: 0x000100, category: 0x000100,
@@ -927,7 +927,7 @@ const b = {
}, },
onEnd() {}, onEnd() {},
do() { do() {
//wiggle wiggle wiggle //wiggle
this.cycle++ this.cycle++
const THRUST = wiggleMag * Math.cos(this.cycle * 0.3) const THRUST = wiggleMag * Math.cos(this.cycle * 0.3)
this.force = Matter.Vector.mult(Matter.Vector.normalise(this.direction), this.mass * THRUST) this.force = Matter.Vector.mult(Matter.Vector.normalise(this.direction), this.mass * THRUST)