turret mod

This commit is contained in:
landgreen
2020-07-08 15:58:46 -07:00
parent ef28029415
commit 31c16b1c71
7 changed files with 314 additions and 235 deletions

View File

@@ -388,6 +388,7 @@ const b = {
if (Matter.Query.collides(this, map).length > 0) { //touching map
if (angle > -0.2 || angle < -1.5) { //don't stick to level ground
Matter.Body.setStatic(this, true) //don't set to static if not touching map
this.collisionFilter.mask = cat.map | cat.bullet
} else {
Matter.Body.setVelocity(this, {
x: 0,