Language…
8 users online:  Atari2.0, drkrdnk, GRIMMKIN, JezJitzu,  Nanako, Nemesis1407, Pink Gold Peach,  Segment1Zone2 - Guests: 244 - Bots: 305
Users: 64,795 (2,376 active)
Latest user: mathew

Snufit bullets disappearing immediately when fired? Solution inside!

A few months ago, I was making my first Mario 64 romhack for the SimpleFlips Retro Hack competition, when I came across a rather odd issue. Snufit bullets would mysteriously collide with something immediately upon being fired by the Snufit. Googling this issue led to only one relevant result, which is the following post from the "common questions" sticky.

Originally posted by Boocraft999
For whatever reason when I placed Snufit in my level his bullets dissapeared immediatly once he shot them. How do I fix this?


But nobody answered them.



I ended up digging through the game code myself, and I found the cause. When a Snufit bullet is spawned into the world, it briefly exists at 0, 0, 0. While it is in this position, 1 collision check is performed. If you happen to have a floor triangle at this position, it will mark the object as being snapped to the floor, which is enough for the Snufit bullet to decide that it hit something and explode. All I had to do was shift my entire level down a bit so that 0, 0, 0 had no triangles.

I was thinking about this again today, and I decided to post the solution here now so that future googlers will find an answer. And if Boocraft999 is still around, they will finally get the answer to the question they asked back in 2016.