Damn, I should've put laser mesh onto the same visual layer as the gun (it's rendered in subviewport), that's probably why it's a bit misleading. It uses hitscan from the camera to detect boxes and obstacles. Mesh is generated from gun point to the hitscan position. I also wanted to have 2 different cursors for boxes and laser, but I couldn't figure out how to implement it at first and decided to skip it to finish in time.
And I totally forgot about Antichamber! It's definitely was a subconscious inspiration for this game. The "3D fps puzzle with guns" should definitely be it's own genre lol