Category Archives: unity

Installation Instructions for Leap Avatar Hands for Leap Motion Orion

Installation

  1. Open your Unity project.
  2. If you have previously installed the old Leap Motion V2 skeletal tracking asset, ensure it is COMPLETELY REMOVED. This includes the various Leap motion DLLs etc.
  3. Ensure that the Orion version of the Leap Motion tracking software is installed on your computer https://developer.leapmotion.com/orion
  4. Ensure the official Leap Motion Orion Unity assets package is added into your Unity project https://developer.leapmotion.com/unity
  5. NOTE: The current version of this asset (1.21) is not compatible with the latest Leap Motion Orion Core Assets (4.1.0), please use the older 4.0.2 version of the core assets for the moment.
  6. The pending version on the asset store (1.3) REQUIRES Leap Motion Orion Core Assets 4.1.0.
  7. Download and import the Avatar Hand Controller for Leap Motion from the asset store.
  8. That’s it! The package will be installed into a LeapAvatarHands folder. You can check out a demo scene in the Scenes sub-folder.

Configuring your own avatar

Adding this solution onto a player avatar in your Unity scene is quite easy, although does require a fair bit of configuration for the avatar.

  1. 1. Set the update mode on the Animator component of your character to “Animate Physics”.
  2. For desk mode: Add a child gameobject to your player gameobject (GameObject->Create Empty Child). The player gameobject must be a properly rigged character with 5 fingered and 3+ jointed hands. I did all my testing with characters generated by Mixamo Fuse, and then rigged with the Mixamo auto-rigger.
  3. For VR mode: Add a child gameobject to your camera gameobject (GameObject->Create Empty Child).
  4. For desk mode: Position this child gameobject where you want the virtual Leap controller to sit, generally speaking you will want this to be about 20-40cm out from the avatar’s belly button.
  5. For VR mode: Position this child gameobject 0.1 z-units forwards of the Camera gameobject, so it sits a little ways in front of the avatar’s face. Then ROTATE the object -90 on the x axis and 180 on the y axis, so that it is facing forwards in the same way that the leap motion itself would face forwards when mounted on a VR headset.
  6. Add the IKOrionLeapHandController script and the LeapProvider script to this empty gameobject.
  7. Go to the avatar’s left hand and add the RiggedHand script from the Leap Unity package to it.
  8. Set the handedness appropriately.
  9. Add the AutoRigHand component to the hand and use it to automatically set up the hand. You will still need to set finger pointing and palm facing parameters appropriate for your particular avatar, although Mixamo rigged avatars should work with the default settings.
  10. You will also need to set the finger pointing and palm facing vectors for each hand and finger. For reference with my Mixamo characters I had the finger pointing as 0,1,0, and the palm facing as 0,0,0. For each finger I had 0,1,0 and 0,0,0 except the thumb which was 0,1,0 and either -1,0,0 for the left hand or 1,0,0 for the right hand. However, these settings will depend on how the character is setup.
  11. Do steps 7-10 for the right hand also.
  12. Go back to the IKOrionLeapHandController gameobject and set the Avatar Left Hand and Avatar Right Hand fields to use the hands you just configured.
  13. Go to the root node of the avatar and add the IKActioner script, and tell it which gameobject you put the IKLeapController onto.

The IKActioner script passes the inverse kinematics pass from the animator component on the avatar up to the actual IKLeapHandController.

The IKLeapHandController is an extension of the provided LeapHandController, set up to work with avatar hands and inverse kinematics.

Using rigid hands

So that your hands can interact with physical objects in game, I have included a RigidIKRoundHand_L and RigidIKRoundHand_R prefab which will work with my IK solution.
For desk mode simply add these as children of the IKOrionLeapHandController gameobject and update the physics left hand and physics right hand references in the IKOrionLeapHandController script.
For VR mode place these two gameobjects in root transform (straight into the scene, not as a child node of another transform). Then update the left physics hand and right physics hand references in the IKOrionLeapHandController script to point to them.
NOTE: Physics hands are a little inaccurate still, but can be improved by fine adjustments to the offset and wrist offset parameters in the RigidHands and RiggedHands components. The avatar hands are limited by the range of movement of the avatar’s hands, whereas the physics hands are not. Consequently, it is difficult to get the physics hands and the real hands to sync up perfectly. The offset and palm width parameters of the RigidIKHands can be tweaked to improve accuracy, but it’s still not perfect, particularly when your arms are at full stretch.

Making your own Animator

It is important to note the two different layers I used in my example Animator, with IK Pass enabled on the base layer and blending set to override with a weight of 1.
Also, don’t forget to set the Animator to Animate Physics! This tweaks the order of execution, allowing the Leap data to override the animation data.
If you make your own Animator and it’s not working right, refer to the example to see how it’s meant to be done.

Using Hand Position Data at Runtime

Unity has a very particular order of execution. If you attempt to reference the hand transform in the Update method you will find that the data is incorrect, it will be based on where the currently playing character animation thinks the hand should be, rather than the leap motion hand data. The Animator IK pass happens after this.
As such, if you are trying to use the hand transform data at runtime, you should probably be doing that in LateUpdate(), after the Leap data and IK pass has occurred.

Leap Motion Avatar Hand Installation Instructions for V2 Skeletal Tracking System

Installation

  1. Open your Unity project.
  2. First check that you have installed the official Leap motion V2 skeletal tracking asset, available free on the asset store. Optionally you may also want the Leap Motion OVR assets, available from the Leap motion developer website.
  3. Download and import the Avatar Hand Controller for Leap Motion from the asset store.
  4. That’s it! The package will be installed into a LeapAvatarHands folder. You can check out a demo scene in the Scenes sub-folder.
What you should see in your project assets folder if everything has been installed.
What you should see in your project assets folder if everything has been installed.

Configuring your own avatar

Adding this solution onto a player avatar in your Unity scene is quite easy, although does require a little bit of configuration for the avatar.

  1. Set the update mode on the Animator component of your character to “Animate Physics”.
  2. Add a child gameobject to your player gameobject. The player gameobject must be a properly rigged character with 5 fingered and 3+ jointed hands. I did all my testing with characters generated by Mixamo Fuse, and then rigged with the Mixamo auto-rigger.
  3. Position this child gameobject where you want the virtual Leap controller to sit, generally speaking you will want this to be about 10-30cm out from the avatar’s belly button.
  4. Add the IKLeapHandController script to this empty gameobject.
  5. Go to the avatar’s left hand and add the RiggedHand script from the Leap Unity package (v2.0+) to it.
  6. Go to each of the avatar’s fingers and add the RiggedFinger script to them.
  7. Set the finger type on each of the fingers.
  8. Set the bones (transforms) on each of the fingers, you should have 3, with the first one being the transform that represents the base of that finger, the second one being the knuckle, and the third one being the joint between the knuckle and fingernail.
  9. Go back to the avatar’s hand, and set each finger in the Fingers array: Thumb, Index, Middle, Ring, Pinky.
  10. You will also need to set the finger pointing and palm facing vectors for each hand and finger. For reference with my Mixamo characters I had the finger pointing as 0,1,0, and the palm facing as 0,0,0. For each finger I had 0,1,0 and 0,0,0 except the thumb which was 0,1,0 and either -1,0,0 for the left hand or 1,0,0 for the right hand. However, these settings will depend on how the character is setup.
  11. Do steps 4-9 for the right hand also.
  12. Go back to the IKLeapHandController gameobject and set the Avatar Left Hand and Avatar Right Hand fields to use the hands you just configured.
  13. Go to the root node of the avatar and add the IKActioner script, and tell it which gameobject you put the IKLeapController onto.
Leap Hands - Connected to your avatar.
Leap Hands – Connected to your avatar.

The IKActioner script passes the inverse kinematics pass from the animator component on the avatar up to the actual IKLeapHandController.

The IKLeapHandController is an extension of the provided LeapHandController, set up to work with avatar hands and inverse kinematics.

Using rigid hands

So that your hands can interact with physical objects in game, I have included a RigidIKHands prefab which will work with my IK solution. Simply add these into the physics hands slots on the IKLeapHandController component.

How to use rigid hands with the IK Leap Hand Controller.
How to use rigid hands with the IK Leap Hand Controller.

Using Leap Avatar Hands with Oculus Rift (OLD)

Note: This set of instructions relates to the old Oculus OVR package, and does not directly work with the new Unity Native VR feature.

leapovr_avatar_hands
How it should look when you’ve got it right.

Using my Leap Avatar Hands controller with the Oculus Rift DK2 is quite easy. Leap have provided examples of how to use the Leap motion with the Oculus Rift as part of their LeapMotion+OVR package. Using my controller works the same way as theirs.

Essentially you need to do only a few things:

  1. Add an Oculus OVR Camera Rig from the Oculus provided Unity 4 Integration package onto your avatar, just in front of their eyes.
  2. Drag the LeapHandController GameObject I provided onto the Oculus Camera Rig’s CenterEyeAnchor transform.
  3. Set its position to 0,0,0
  4. Set its rotation to 270,180,0 (this mimics the physical orientation that the Leap Motion device will have when it’s attached to the front of your Oculus Rift headset).
  5. Set the “Is Head Mounted” flag to true in the IKLeap Hand Controller component.
  6. Move the LeapHandController object along the z-axis so that it is a little ways in front of the camera rig object. Tweak this location to suit.

When you’re done it’ll look like the screenshot provided above.

Leap Avatar Hands in action with the Oculus Rift.
Leap Avatar Hands in action with the Oculus Rift.

 

Mecanim is broken and needs to be fixed properly

Generally speaking, Unity has a coherent design philosophy that provides a nice workflow. Essentially you make GameObjects in the Editor, then when you hit play it makes a working copy of the object. Any changes that are made to that object during runtime are not reflected on the original. Your scene is preserved, your prefabs are preserved, yet your game play objective is met.

There are a couple of notable exceptions to this rule that I have encountered.

Navigation meshes. You can only generate these in the editor, and have very limited access to them with scripts. This is a bad design choice, and should be fixed.

However, to work around this I just use the RAIN NavMesh implementation (free on the asset store!), which has been done properly. It provides you with the editor tools to generate NavMeshes in the editor, but it also gives you complete access to the NavMesh library at runtime. It’s also faster. It’s just plain better than the built in Unity NavMesh solution in every way I can think of. Because RAIN exists the Unity NavMesh implementation doesn’t bother me so much… but it’s still wrong.

Bad design.
Bad design.

The other one is the one that really grinds my gears. The Mecanim animator. Their implementation makes no sense. It’s billed as a major feature of Unity’s engine, but it’s underpinned by a simply bad design choice. To make things worse, despite being aware of the issue, the response from Unity has been to patch it with dodgy hacks and work-arounds, rather than solving the actual problem in a way that empowers developers to do their job.

Bad design.
Bad design.

Mecanim Animator

At some point during design someone decided that the Animator component itself would not be cloned off to a working copy like normal Unity GameObjects. Rather, just the animation parameters and the current state of the machine would be individual.

Bad design.
Bad design.

Consequently any changes made to the animator are permanently saved. As such, if someone was to use a script to fiddle with their animation state machine it would have unintended permanent consequences.

To prevent this, virtually none of the animator data structure is exposed to scripts. You cannot access States, Transitions, BlendTrees, Clips… you know, everything useful.

Bad design.
Bad design.

This has serious consequences. Consider the situation where I have several attack animations, but my character has various attack speeds depending on which particular weapon they’re using, such as in Borderlands or Diablo. The attack animations need to be played back with an animation speed such that the animation play length matches the attack speed.

For example, WeaponA has attack speed of 1.5 attacks per second. The attack animation that applies to that weapon has an original length of 3 seconds. To make that 3 second long clip play in 1.5 seconds, I need to make sure that the speed of that clip is set to 3/1.5=2. To do this I need access to both the length of the clip, and the speed parameter of the motion in the attack animation state. Unity currently gives me access to neither.

How should this work? The same way almost everything else in Unity works. The actual animator component that is on a given character should be a working runtime clone of the original, and any changes to it in script should be reflected immediately in game play, but not saved permanently. This way I can change whatever the hell I please in runtime scripts, without any permanent ramifications. They could expose everything.

Unity acknowledge that this problem exists – so in the 5.1 release they have a solution whereby you can drive the speed variable with an animation parameter, just tick a checkbox! Hurrah?

No. This is a hack solution to a problem that shouldn’t exist.

Bad design.
Bad design. On a side note, disastrous public bathrooms are 90% of what you get in a Google image search for “bad design”.

Fix it properly. This solution will only fix a very small subset of the problems that you should be able to solve through manipulation of the animation state machine at runtime. Give us tools that allow us to do whatever we please with our game while it is running.

I appreciate that there can be a certain level of “protect the user from themselves”, and that there are sometimes limitations or efficiencies that we might not fully understand. But in this instance, it really does appear that it’s just a bad design choice that needs to be fixed. Properly. I don’t believe for a second that cloning the animation state machine for each animated character would have disastrous performance implications. Games in other engines have been doing it for years without issue.

What do you think? Do Unity need to address this obvious issue? Am I way off on this one? Is there some missing piece of information I don’t have that would make this all make sense?

The Plan: How one man with no time intends to make the next Diablo this year

I have a problem – I want to make a game, but I don’t have a lot of free time.

I’m a full time research scientist, father of a 10 month old baby, and partner to a sweet and deserving woman. I’m a family man now, and with that comes responsibility. I’m in no position to take significant time away from work. I’ve got a mortgage and mouths to feed. Vanessa is taking care of baby full time, so our income is already a lot lower than it used to be. Besides, I quite like my job (most of the time at least). I’m hardly going to quit.

Ok, so I want to make games, I don’t want to quit my job, but I don’t have much free time. How can I make this work?

Stop focusing on what I don’t have, start focusing on what I do have

It’s not very productive to fixate on how little free time I have, how tired I am, and how it’s a serious challenge just to keep my head above water. I need to take stock of things in an objective fashion and find a way to move ahead. If it is truly important to me that I make a game in my spare time I need to figure out how to make that possible.

no-time-to-say-no-time

I have skills and knowledge.

I’m a skilled and experienced programmer. I’ve got a PhD in Computing and years of experience implementing highly technical and complicated solutions to very sticky problems. Best of all, because some of my research projects have been in the serious games field, I’m skilled in game development using Unity. I’ve got a head-start over many indie developers, who often need to spend significant time getting up-skilled.

I have many of the tools I need.

Thanks to the aforementioned serious games projects I already have Unity Pro licenses and my Unity store account is already pre-loaded with a good set of useful development tools and assets. In particular, I’m fortunate enough to have a current subscription to Mixamo All Access, giving me near unlimited access to their massive library of humanoid animations and their very nice Fuse character creation tool.

I have some disposable income.

I’ve been working as a full time academic since 2009, and until recently my partner was working full time as well. We live quite frugally, and are generally very financially responsible. This has put us in a comfortable position financially.

I have money, but I don’t have time. I can buy back time by spending money on assets and tools that will save me time. It’s important to me that I make a game, not that I make every little part of the game myself.

I have accrued leave.

In Australia we earn 20 days of annual leave for every year we work. However, I typically only use 10-15 days of annual leave per year. Currently I have 35 days of annual leave in the bank. It’s not much in the scheme of making a game, and my partner will kill me if I burn through it all just to “do different work!”. But I can probably get away with spending 5-10 days of that on my personal projects, while still leaving plenty for proper family holidays and emergencies.

I have public holidays.

In Australia we are fortunate to have a respectable number of public holidays per year. As an academic I’m lucky enough to get a few extra “for free” (read: senior management and the union negotiated extra days of leave as an alternative to a more respectable annual pay increment). We get extra days at Easter and Christmas.

I do have some free time.

We put baby to bed between 7-7:30pm every evening. We are constantly exhausted and go to bed at 9:30pm. There’s a two hour window each evening in which I can potentially do a little work. Most nights I need to unwind and spend some quality time with my partner, or else our relationship can get strained. But on average I can probably squeeze around half an hour to an hour of “work” in the evenings, provided I’m motivated enough… It’s not quite the same as proper, focused, “in the office” work, but it’s something. I can also squeeze a couple of hours most weekends during baby’s daytime naps.

I have a game idea.

If the goal is to make a game, I have to come up with a good game idea first. Importantly, this idea has to be one that is sufficiently exciting to motivate me, yet one that recognises my limited time. I’m not going to make the next Skyrim solo in my spare time. I have to limit scope. Ideally I should probably be making a simple mobile game or arcade game, but I don’t like to play those kinds of games and I really don’t want to make one of those games. No point in trying to start a project I have no passion for.

I have decided I want to make a Diablo style top-down ARPG rogue-like with procedurally generated dungeons. To make it interesting I will use arcade elements instead of a vast world and a rich lore which are outside the scope of what I can reasonably deliver. The player will have a limited amount of time to get as deep into the dungeon as possible, while competitive leaderboards and character customisation elements will encourage replayability. See the WIP draft design documents for (a lot) more detail.

This idea is particularly inspiring to me, as it is the kind of game that I want to play, now that I have so little free time. A game that is inherently designed to be finished in under 15 minutes is perfect when you know that you only have 15 minutes to spare.

Make a plan

Alright I don’t have much free time, so I have to make sure that what little time I do have really counts. This means careful planning as per my previous blog post.

Looking at the calendar, I should be able to use a couple of days of annual leave to turn Easter into a full week break, and I can negotiate with my partner to spend a good percentage of that time working, once all the family obligations are complete.

I am going to use that window to really get stuck into implementation. I need to be able to sit down and focus for hours at a time, with few distractions, and without significant breaks between sessions. Once I’ve got a framework in place and I’m comfortably underway I can iteratively solve minor problems one at a time using my short blocks of free time, and feel like I’m still making progress, but without that initial burst of progress I find it very hard to motivate myself. Your mileage may vary, but this is what seems to work for me.

But now I have a deadline! I need to be ready to start full steam coding by April the 3rd! I’m only going to have a week, and I need to be able to get as much done as possible in that time. So my time between now and then is really valuable. There’s a lot of planning and preparation work that needs to be done to lay the groundwork.

  • I can browse the asset store to find the assets I need, and determine what I have to make for myself. 
  • I can prepare design documents and think about gameplay elements.
  • I can blog.
  • I can recruit Twitter followers.
  • I can prepare my website.
  • I can read up about solutions to the problems I know I’m going to have to solve.
  • I can prepare for marketing and promotion activities. Live streaming? Press releases? Greenlight? Kickstarter? Dev blogs? It all benefits from having some advance planning.

Clearly, I’ve already started doing these things. You can see my WIP draft design documents that outlines the game. My Twitter account has grown from 16 followers to over 350 followers over the last 6 weeks. I’ve been reading a lot about indie game development, greenlight, crowdfunding, dev blogs, blogging in general, marketing, press releases, and video production, and practicing these things where possible. And I’ve already found a great set of assets on the Unity Asset Store that are going to be perfect for my game.

I’ve also got an angle on this week of coding. I want to use this opportunity to showcase the amazing value that the Unity Asset Store offers, by demonstrating just how much one person can achieve in only a week if they make good use of the asset store. How’s this for a blog post title? “How much game do you get for $400 and 40 hours? – An experiment with the Unity Asset Store”.

Get to work?

By now I feel like I’m pretty much ready. I have a clear vision of what I want to achieve, and a plan in place to help me achieve it. There’s still plenty of things that I can do in advance, but I could start work tomorrow and feel like I was using my time productively and efficiently.

There is still one significant problem left to solve though. The game I want to make is still too big. It’s small enough that I can make a good start in my one week coding spree, but it’s not going to be feature complete, and it certainly won’t be consumer ready. I know from experience that if I cannot keep sustained momentum on this project throughout the year then it will eventually be abandoned. This has happened too many times before.

To a certain extent this problem can be solved by cutting scope. But for the style of game it is, the scope is already quite limited… Cutting it any further risks making the game disinteresting, un-fun, or lacking in replayability. Game designs are like plants. Pruning them back can be beneficial if you go about it in the right way, but if you go too far then the plant will simply die.

Stay motivated

This is where you come in, Dear Reader. I need you to want this game to be finished, I need you to put the pressure on. If I know the demand is out there, then the motivation will flow.

Follow me on Twitter, and feel free to heckle. Many of my best achievements have been motivated in part by wanting to prove other people wrong.

Salvador Dali knew how it was.
Salvador Dali knew how it was.

Unity Asset Store: Buying time with money

The fundamental premise of my grand plan to make an overly ambitious game this year, despite having virtually no time to work on it, is that I can buy tools and assets on the Unity Asset Store that will save me months of hard work. I actually looked extensively at what was available on the asset store before I decided to go with my time-limited Diablo-styled rogue-like ARPG game idea, 15 Minutes. The deciding factor was the sheer amount of high quality and very affordable stuff that I could buy from the asset store and use without much too much modification in this game.

This post is going to be a living post, wherein I list each of the assets I am considering buying and have bought, and describe my reasoning for buying them over other assets, as well as my trip report once I actually make use of the assets.

Environment Graphics

Since I’m a programmer with extremely limited 3D modelling and art skills (I once had significant difficulty texturing a cube the way I wanted it), the most important thing to make this project viable was that I could purchase all my 3D models. I definitely don’t have a year to practice my 3D modelling, and I don’t have another year after that to make all the models and materials I’m going to need.

When I first started browsing the asset store I immediately discovered the work of 3DForge. This guy has spent the last 2 years just making a phenomenal amount of fantasy themed graphics, all with a consistent semi-cartoony style, and all 100% game ready. After a couple of days of idly flicking through all the competitor products my mind was firmly made up, and I pulled the trigger on four huge packages that he’s released. Totaling $120 I have already purchased basically every model I would need to create this game… And it’s AAA quality as well, so I’ve made my game look way more awesome than I otherwise could have dreamed of, at the same time as saving hundreds of hours of work. Win-win.

Follow him on Twitter if you like what you see, he sometimes puts his packs on sale and announces it on his Twitter account.

Village Interiors Kit

This is an all in one fantasy interiors kit. It’s a lot more than just “village interiors”. It’s basically a mega pack, with over 2500 prefabs included and game ready. It even includes arguably all the weapons I need.

TaD – Sewer Kit

This is a nice sewer level kit, designed specifically to be suitable for “tile a dungeon” style games.

Fantasy Treasure Loot Kit

Various chests, scrolls, books, crates, barrels, coins, ingots, rings, amulets, potions. Going to make use of a lot of this stuff!

Particle Effects

Magic Projectiles 1.5

I grabbed this on sale for $10. It’s got a full set of game ready standard spells. Contrary to the title, it also includes shields, domes and auras, as well as projectiles. This one purchase got me every particle effect I needed to make the spellcaster class for my game. I’m not very good at making particle effects, so this purchase will have both improved the visual feel of my game, as well as saved me a lot of time. Twitter.

Scripts/Tools

Full Inspector: Inspect Everything

This nifty little extension to the MonoBehaviour class allows you to tinker with a significantly extended set of data structures using the inspector. Unity will let you play around with arrays, strings, ints, floats and the like… But Full Inspector takes it to the next level, letting you edit things like Dictionaries. It even deals with generics. Super useful.

DunGen

This procedural dungeon generator is super cool, and is basically a more polished and refined version of exactly what I had in mind when I started thinking about this project. It essentially allows you to build dungeon tiles of any size. You just tell it where the doors are (supports doors of all different sizes and shapes), define how likely things are to spawn and where, and then tell it to generate a dungeon. It figures out the rest. I’m basically 100% sold on using this as my procedural dungeon generation solution, but it’s $75 so I’ve just left it in my wishlist for now. If it goes on sale at some point before I’m ready to start coding then I’ll snap it up. Otherwise, I’ll just buy it when I need it. Twitter.

SimpleLOD

I also got this one on sale for $10. I’ve yet to use it, but as someone who has wasted whole work days setting up LODs in the past, the promise in the product description was enough to convince me that it would be a good investment. Not only would it do the decimation of your models, but it promises to also automatically set up the LOD levels for you. This is a fairly tedious process in Unity, so it’s potentially a great time saver. Twitter.

HerdSim

I grabbed this one on a whim when it was on sale for $8.75. I’ll use it to set up minor environmental critters like rats and cockroaches. Since these guys are just for atmosphere they don’t really deserve a proper AI, so it should be cheaper to just use HerdSim to let them wander about in a semi random fashion. Twitter.

RAIN

This is actually free, but it’s pretty awesome so it needs to be mentioned all the same. RAIN is an all-in-one behaviour tree based AI solution for your NPCs in game. Super importantly it includes its own Navigation Mesh solution which is in some ways superior to the built in Unity NavMesh system. In particular, it can be used to generate NavMeshes during runtime, and it’s pretty quick to do so.

Using RAIN I’ll be able to quite easily define a range of simple behaviours for the various types of NPC in my game. All the NPC movement and player detection stuff, which would normally be quite challenging, is going to be super easy. This free asset singlehandedly makes the game I want to create a whole lot more achievable… I’d go so far as to say I probably wouldn’t have attempted this project if RAIN wasn’t available. There is a learning curve, and the documentation leaves a little to be desired, but once you know how to harness it this tool has a lot of power. Twitter.

TextMesh Pro

I don’t strictly need this tool for this project, but since I already have it I’d be stupid not to use it. It makes it really quite easy to create cool graphics text effects within world. It’s a lot better than Unity’s built in text meshes. I’ll use it for menus, tutorials, title-screens, etc. It’ll make them look much more professional, distinctive, and cool. Twitter.

Characters

Mixamo Fuse

I already have Mixamo Fuse as part of my All Access subscription. I can use this to make any human and zombie characters I need. I’ve used it previously, it’s really quite good, and the ability to just upload your character straight to Mixamo for automatic rigging and animating is awesome.  Twitter.

I can also grab pre-made characters/monsters and the like from Mixamo too. There’s about 100 available on their store, which are all at my disposal thanks to All Access.

Monsters

You can get quite a lot of monsters and the like for free on the asset store. The quality is a bit variable though. I’m not 100% sure what I’m going to do here. I may need to buy some for specific NPCs. I’ll play this one by ear! Let me know if you have any recommendations.

Forest Creatures Pack

This bundle of creatures is nicely optimized, cute, and provides me with a broad base of creatures with a good selection of sensible animations for this type of game – melee, projectile, spell, damage, death, idle, walk, run. By providing a range of colours for each monster the creator gives me the easy option of using different versions of the same creature at different levels of the dungeon. Ideal for the kind of game I’m planning.

I do have some reservations about how well the art style will mesh with the rest of the graphics assets in my game, but I’m fairly confident. The environments are semi-cartoony already, just not quite on the same level as these creatures. We’ll see how it goes. I got this on sale for $75, which is a good price, but not cheap. Hopefully it works out. Twitter.

Animation

Mixamo

As mentioned earlier, I already have an All Access subscription. The Mixamo animation library is absolutely huge, reasonably easy to use, and very much game-ready. All my movement, attack, and defense animations will come from Mixamo. I’ll just have to make the Mecanim animation controllers myself – but that’s pretty unavoidable. Twitter.

Sound

Universal Sound FX

Got this pack for $10 on sale. It’s got a lot of sound FX that are game ready. Most of them I will not need for this game, but they may come in handy for future games. There are a ton of useful sounds for this game though – weapon clashes, spells, arrows, and heaps more. I could have just gotten these sounds off freesound.org, but then they’d be varying levels and require a certain amount of massaging in Audacity before I could use them. The $10 I spent here will save me quite a few hours of trawling through and editing sounds. Well worth it. Twitter.

Fantasy Music Collection?

There’s a lot of good music options on the asset store that would suit this kind of game. The one I’m most impressed by at the moment is the Fantasy Music Collection, but I’m not 100% convinced just yet, and at $30 it’s more than I’m willing to spend without being convinced.

The problem I have is that I want the game to be distinctive and recognisable. A really canny music choice can make all the difference. The biggest problem I have with the music packs on the asset store is that most of them have been used quite a few times already, so you lose the personal touch. I’ll keep my eyes open for a while yet. But if it comes on sale I might just buy it, because even if I don’t end up using it in the final product it’d be a great placeholder for the alpha and beta releases.

Cut-scenes

uSequencer

There’s not a lot in the way of cut-scenes I need for this project. Really just one for the opening story that sets the scene, and maybe another for the closing scene.

I could do these manually without too much trouble, but when I saw uSequencer on sale for $22.50 I figured it was time to pull the trigger on it. It will make this activity easier, and there’s always scope to use it in plenty of other projects!

I did hesitate, because Unity have teased a similar set of features coming natively to Unity “at some point during 5”, but who knows when that will be, or how complete it will be. Twitter.

Leap Hand Controller for your player avatar

Now Available on the Unity Asset Store

Leap Motion provide a bunch of Unity assets for integrating Leap motion controls into your game. Unfortunately, the hands they provide are all disembodied hands, with no connection to the player avatar.

I thought this was a bit of an obvious omission, so I made my own solution which drives the avatar character’s own hands using the Leap controller. The arms are sorted out in a more or less natural way using Inverse Kinematics (as such, this is a Unity Pro only feature, sorry Free version users!).

You can see this in action in the YouTube video below.

This is done as a simple extension to the Leap Hand Controller class, and still uses the RiggedHand class Leap provide to drive the actual hand.

Instructions

Adding my solution onto a player avatar in your Unity scene is quite easy, although does require a little bit of configuration for the avatar.

  1. Add a child gameobject to your player gameobject. The player gameobject must be a properly rigged character with 5 fingered and 3+ jointed hands. I did all my testing with characters generated by Mixamo Fuse, and then rigged with the Mixamo auto-rigger.
  2. Position this child gameobject where you want the virtual Leap controller to sit, generally speaking you will want this to be about 10-30cm out from the avatar’s belly button.
  3. Add the IKLeapHandController script to this empty gameobject.
  4. Go to the avatar’s left hand and add the RiggedHand script from the Leap Unity package (v2.0+) to it.
  5. Go to each of the avatar’s fingers and add the RiggedFinger script to them.
  6. Set the finger type on each of the fingers.
  7. Set the bones (transforms) on each of the fingers, you should have 3, with the first one being the transform that represents the base of that finger, the second one being the knuckle, and the third one being the joint between the knuckle and fingernail.
  8. Go back to the avatar’s hand, and set each finger in the Fingers array: Thumb, Index, Middle, Ring, Pinky.
  9. You will also need to set the finger pointing and palm facing vectors for each hand and finger. For reference with my Mixamo characters I had the finger pointing as 0,1,0, and the palm facing as 0,0,0. For each finger I had 0,1,0 and 0,0,0 except the thumb which was 0,1,0 and either -1,0,0 for the left hand or 1,0,0 for the right hand.
  10. Do steps 4-9 for the right hand also.
  11. Go back to the IKLeapHandController gameobject and set the Avatar Left Hand and Avatar Right Hand fields to use the hands you just configured.
  12. Go to the root node of the avatar and add the IKActioner script, and tell it which gameobject you put the IKLeapController onto.
Leap Hands - Connected to your avatar.
Leap Hands – Connected to your avatar.

The IKActioner script passes the inverse kinematics pass from the animator component on the avatar up to the actual IKLeapHandController.

The IKLeapHandController is an extension of the provided LeapHandController, set up to work with avatar hands and inverse kinematics.

Interested?

Let me know if you’d like to see this work polished up and added to the Unity Asset Store. I’d be happy to sell it for only a few dollars if there’s any demand for it.