The last two days have been pretty slow with regards to productivity. Lots of “one step forward, two steps back” moments.
The one problem that plagued me for hours was that my animations would only move the colliders of the objects, and nothing else. Like this:
As you can see, for everything except the stairs, only the collider (the green outline) is moving, but the rest of the object remains behind.
For hours, I struggled over this, and couldn’t seem to figure out what was wrong. Eventually, I put the question to twitter, and David Laskey pointed out that it might be due to having the geometry set as static. It turns out he was right! Thanks to him, I did not destroy my keyboard out of frustration.
I was aware of the static setting for game objects, but up until this issue came up, I thought it applied only in the context of lightmapping. I didn’t realized it affected animation as well.
I think what threw me off also is that previously when I animated, I was using Unity’s primitive shapes, which are by default not set to static. However, this time I was using objects created with ProBuilder, and those are by default set to static, so that threw me off a bit.
Anyway, got the animation working eventually, here it is in action:
I’m continuing to work on redesigning the first stage of the game, refining the architecture, and polishing bits here and there.
Here’s one of the red doors:
And this is a clip of a bridge that forms itself in front of you (Bastion inspired), plus a gravity rotation: