From 1ff729f696c895f81f0cf0d1b8a2cca1d6e43eb8 Mon Sep 17 00:00:00 2001 From: iamcheeseman <[hidden email]> Date: Fri, 13 Feb 2026 20:42:28 -0500 Subject: simple raycasting mmmmmm --- src/bullet.odin | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/bullet.odin') 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{ -- cgit v1.3-2-g0d8e