I’m a decent animator just trying to make something of quality for the Unity store for the first time. I’m not a programmer and I’ve had to invest a lot of time fiddling with Unity just to get this far…
I managed to get a root-motion monster working so far like this:
mesh.fbx with an animator (targets the appropriate animator controller and avatar), character controller, and a test script that takes keyboard input to play various animations, some of them selected randomly. It uses individually saved animation fbx files. It moves around just fine.
So I spent most of a week making a 4-level LOD set, assuming what I’d seen of the LOD-Group component that it was simple to use. No.
I made an empty object, named it, dropped the 4 meshes under it, added an LOD-Group component and dragged the meshes into their slots. Works fine. And this is where all documentation stops, assuming I’m supposed to be an experienced programmer in Unity I guess.
Now to make it move like the original non LOD version does. Duplicating the animator, character controller and script (like I had on the working non-LOD original mesh) on the “LOD group object” results in nothing-- Frozen model. So I thought perhaps the individual meshes need to be the ones with the animator. So I move the animator from the group object to its mesh children. That results in a moving, idling mesh but it is not responding to the script. So I moved the character controller from the LOD group object to its mesh children. Same thing-- no response to the script.
So here is where it gets stupid. I moved the keyboard-input script that manages the character controller from the LOD group object to its 4 mesh children. Oh it animates alright and takes keyboard input, but as I suspected, its considering each of these LOD levels its own instance of the script. When I pick a random animation, the different LODs are going their own way. As you zoom in and out you see the monster pop from here to there as it plays different animations. Obviously the script is supposed to be on the parent LOD group but it DOES NOT WORK.
None of this stuff is in the documentation. Every artist is going to encounter this problem. Even though I’m not a programmer, I know that the whole point of a LOD group would be to have it do nothing but control what mesh is being shown, but not what behaviors each LOD had. Or am I wrong and its that I cant have randomness in anything using an LOD because games never should have random animations of course! /sarc
Unity is frustrating for pure artists. Anyone got any solutions? Whats the “right” way.