12/05/19: Time for a Reboot

Sometimes you just reach a point where what you’re doing in the project isn’t working, and it’s time to start fresh.

I hit that point this week with the Ruby Bridges case study.

All of the issues that Tori and I have had with the various animations really came to a head when I was trying to get the sidewalk animations coordinated. I realized that the system we were using to drive all the character’s locomotion (other than the user) just wasn’t working, and I was spending more time trying to fix little timing problems than actually setting up the scene. The project was also getting cluttered with previous versions of animations (we found another issue with the male walk cycle causing broken knees). I started over with a fresh project on Monday night, only bringing in the finalized animations as Tori sent them to me, and set up Scene 1 to be driven by NavMeshAgents.

I’ve only actually used NavMeshes maybe once or twice, so this was a bit of a learning curve. I had to figure out how to coordinate the agents getting on/off the meshes for the car scene, make sure there wouldn’t be any interference from the car agent while all the characters were inside, and then determine the best way to drive them using waypoints. With as much time as the reset took me, I’m still convinced that I was able to get more done in a much more organized fashion than I had before. I kept a test scene to work out the animation issues I was having, and then brought the solutions over into the primary Scene 1.

Still from Test Scene, testing character animation transitions.

Using Test Scene to troubleshoot and test HeadLookController.cs

(originally found at https://wiki.unity3d.com/index.php/HeadLookController#Description)

Getting the characters to move along with the NavMeshAgent was easily one of the most frustrating parts. The instructions are outlined pretty clearly at the Unity website, but some of the animations were jumpy or not running once the blend tree was triggered. Some of these issues are still unresolved; I evaded further hours of blend tree debugging by taking the one functional animator I had and just rebuilding all of the character animations on top of it.

Animator controller for Federal Marshal 1, showing all transitions and triggers from the car sequence to the end confrontation with the State Officials.

I’m trying to be a little smarter with my scripting this time around as well, making generalized functions that are flexible enough to be applied to multiple characters, decreasing the repetition in the script. There’s more dialogue in this prototype than the past, and I had some problems making sure the audio sources for the characters were functioning properly. But we made it through, and now the car dialogue works well. I’ll be able to test this more thoroughly once the mob is in and I’m coordinating the audio changes there.

Current State

Status update of characters walking with navmesh. Dec 5 2019.

What’s Left?

As we can see from the above video, there’s plenty of cleanup that needs to happen once the base functions are complete. Implementing door animations, making sure that characters are facing the right way, and adding in the final pieces of the puzzle so that booleans are triggered on time.

I still have a fairly large to-do list now that I’ve got the characters walking together and able to look at specific targets. Implementing that script is the next immediate task. I’m split on what comes after that - I could begin bringing in the mob characters and setting them up. This has to be done before I can start working on any interactive events. But I also need to add the user to the primary group moving down the sidewalk. I focused on getting the characters behaving in their ideal patterns before introducing the user to the scene to interrupt them, but I now need the user to test a script that will keep the group within close proximity of each other. Below is the current list of tasks left:

  • Fully implement “Look At” script for primary group

  • Mob arrangement

  • SteamVR cam setup

    • Includes animation down the sidewalk, group proximity, and coding mob interactions.

  • Scaling environment script (needs importing)

  • Import Prologue scene from previous project version

  • Audio mixing for Scene 01

  • Main Menu

It’s a lot, but things are already going significantly better. I’m starting to implement more organized practices for myself, such as including headers in my scripts to make the Inspector a little kinder to the eyes. Small thing, but it makes me feel better when I have to use it.

The next update will be my overview of how the project went and a video of its state, as well as an overview of the things that need to happen to complete the project for a January exhibition.