Some years ago, when I was into D&D and spending a lot of time in Tabletop Simulator, I created a set of custom dice. It was a fun excuse to learn some basic modeling in Blender and get my first taste of Unity.
Each die represented a different magical power, complete with custom materials and particle effects to help distinguish them on the table.
I published the dice as a TTS mod on the Steam Workshop, and to my surprise they got a fair amount of attention. Most of the comments were positive, although some people mentioned that the particle effects were a little distracting. I didn't think much of it at the time (personal preference and all) and released a similar set of dice without the particle effects.
Eventually I moved on to other things, and that's where the project sat for about six years.
Recently I built a new PC so I could finally get into VR. One day I was checking out the VR support in various games I already owned, and I remembered that Tabletop Simulator had a VR mode. I loaded an old save that included my dice.
Oh.
That's not right.
Those particles are moving way faster than they should be.
My first thought was that I had accidentally tied the animation to the game's frame rate. Years ago I capped almost every game at 60 FPS because of hardware limitations, so I could have easily missed a problem that only appeared at higher frame rates.
But after some testing, that theory didn't hold up. Changing the frame rate in desktop mode made no difference. The particles only misbehaved in VR.
After poking around for a while, I isolated the cause. The particle system's gravity source was set to 3D. Switching it to 2D immediately fixed the issue.
So why did that change in the gravity source cause the particles to behave differently?
Looking through the particle settings doesn't reveal anything obvious. Both gravity modes expose the same acceleration values, and nothing in the inspector suggests they should produce different behavior.
The best explanation I could find in the Unity documentation is... that the setting exists.
Unfortunately, that's where my explanation ends. The documentation doesn't describe how the two gravity modes differ internally, and I wasn't able to find anything else that explains why VR exposed this behavior. As far as I can tell, it's either a Unity bug or undocumented behavior.
Whatever the underlying cause, the particle animation is now consistent between desktop and VR. As a side effect, the particles now move a bit more slowly than they did before. I could increase the gravity modifier to restore the original speed, but after seeing both versions side by side, I actually prefer the slower animation. Maybe those old comments about the effect being distracting had more merit than I gave them credit for.
It was fun revisiting something I made so long ago. I don't usually feel much motivation to return to old projects, but I still think this was a solid idea, and it was satisfying to give it a little polish.
Along the way I also fixed a couple of smaller issues and made some performance improvements. After all, dice probably don't need 1K textures lol.
The updated set of dice is now available on the Steam Workshop if you'd like to give them a try.