diff options
Diffstat (limited to 'src/bullet.odin')
| -rw-r--r-- | src/bullet.odin | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bullet.odin b/src/bullet.odin index da6af73..ceb2ce9 100644 --- a/src/bullet.odin +++ b/src/bullet.odin @@ -4,6 +4,7 @@ import "core:math" import "core:math/linalg" import "core:log" +import "fw" import "phys" Bullet :: struct { @@ -21,13 +22,13 @@ make_bullet :: proc( lifetime: f32 = 5, image_id := Image_Id.Bullet, layers: bit_set[phys.Layer;u16] = {.Player_Projectile}, - mask: bit_set[phys.Layer;u16] = {.Default}, + mask: bit_set[phys.Layer;u16] = {.Hard}, ) -> (Entity_Handle, ^Bullet) { sprite: Sprite init_sprite(&sprite, image_id) set_sprite_offset_percentage(&sprite, {0, 0.5}) - sprite.rotation = math.atan2(vel.y, vel.x) * math.DEG_PER_RAD + sprite.rotation = math.atan2(vel.y, vel.x) sprite.pos = pos body_rect := phys.Rect{ |
