Sweating the Small Stuff

Sweating the Small Stuff


Oh to be back where I was a couple of weeks ago - constructing little scenes in Unity and thinking that I was breaking new ground with my amazing skills.  Oh how wrong I was; animation is a completely different beast.

This might be the most labor intensive part of Unity I've found so far, and when you really think about it, that does make sense.  Static objects don't need any real logic as  they just sit pretty wherever you decide to place them with your digital hand of god.  Objects which move, or have animations and sounds may need to be triggered or initiated in some way.

This is often achieved by interacting with the object (clicking, colliding etc) or by coming within a certain proximity of the object.  Of course, all these variables have to be precisely set up in terms of distance etc to make sure that you get the desired effect.

The other confusing aspect of this process is looped animation - e.g. you approach a door, the door swings open, you back off, the door swings closed.  What you have to break your brain with is the concept that there's another state: "resting" or "waiting for something to happen", and you have to plan accordingly.  The software is powerful, but it has no common sense, so you have to lead it through the entire process step-wise.

One really weird moment for me was trying to get a box to drop off a taller container when the player approached.  Setting a proximity collider was simple, but getting the object to move to a specific location was really hard.  When I set a co-ordinate that seemed correct, judging by the XYZ position of a nearby object, I would play the scene and watch in horror as the box took off and flew across my desert landscape in slow motion.

The easiest solution I could find was to use the "move towards object" command, place a small object where I wanted the box to end up, and execute the logic for that process.  Some might call that dodging the issue, but it worked, and frankly the result looks just as good.

All in all, I became faster with practice, but I really do believe that learning to code would exponentially increase my skill set in Unity, as I would be able to understand the logic behind the commands.



Your email address will not be published. Required fields are marked *