Skip to content

Commit

Permalink
fix hit detection
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffomatic committed Dec 26, 2020
1 parent f8eda3e commit 875bba4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/entities/bullet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { vec2 } from 'gl-matrix'

import * as bullet from '~/components/Bullet'
import * as transform from '~/components/Transform'
import { TILE_SIZE } from '~/constants'
import {
EntityComponents,
makeDefaultEntity,
Expand Down Expand Up @@ -31,8 +32,8 @@ export const makeBullet = ({
e.damager = {
damageValue: 1,
hitbox: {
offset: vec2.fromValues(-2, -2),
dimensions: vec2.fromValues(4, 4),
offset: vec2.fromValues(-TILE_SIZE / 12, -TILE_SIZE / 12),
dimensions: vec2.fromValues(TILE_SIZE / 6, TILE_SIZE / 6),
},
immuneList: [owner],
}
Expand Down

0 comments on commit 875bba4

Please sign in to comment.