fix: collisions

This commit is contained in:
cha0s 2019-10-02 00:38:09 -05:00
parent d6b3bf389c
commit 7476703f37
5 changed files with 28 additions and 7 deletions

View File

@ -27,9 +27,13 @@ export function createEntityForConnection(socket) {
}, },
}, },
collider: { collider: {
// params: { params: {
// collisionGroup: 'player', collidesWithGroups: [
// }, 'default',
'environmental',
'projectile',
],
},
}, },
controllable: {}, controllable: {},
directional: { directional: {

View File

@ -28,6 +28,7 @@ export function fireJSON() {
}, },
collider: { collider: {
params: { params: {
collisionGroup: 'environmental',
isSensor: true, isSensor: true,
}, },
}, },
@ -37,8 +38,8 @@ export function fireJSON() {
damageSpecs: [ damageSpecs: [
{ {
affinity: AFFINITY_FIRE, affinity: AFFINITY_FIRE,
lock: 0.45, lock: 0.15,
power: 15, power: 5,
variance: 0.25, variance: 0.25,
}, },
], ],

View File

@ -13,7 +13,14 @@ export function flowerBarrelJSON() {
life: 1000, life: 1000,
}, },
}, },
collider: {}, collider: {
params: {
collidesWithGroups: [
'default',
'environmental',
],
},
},
emitter: {}, emitter: {},
existent: { existent: {
state: { state: {

View File

@ -81,7 +81,15 @@ export function kittyJSON() {
}, },
}, },
}, },
collider: {}, collider: {
params: {
collidesWithGroups: [
'default',
'environmental',
'projectile',
],
},
},
directional: { directional: {
params: { params: {
directionCount: 4, directionCount: 4,

View File

@ -129,6 +129,7 @@ export function rockProjectileJSON() {
}, },
collider: { collider: {
params: { params: {
collisionGroup: 'projectile',
collisionStartActions: { collisionStartActions: {
type: 'actions', type: 'actions',
traversals: [ traversals: [