Monkey Mayhem – Dev Log 05

By October 12, 2018 Dev Blog

Welcome back to another development log. Its been just a couple of days since I last posted, so I’m going to catch you up on a couple of things.

We as a team decided that we would add some juice to the game by having the monkeys have ragdolls. I was to make this happen by rigging up the monkeys in 3DS max.

We also wanted the branches to have a bit of animation when the player jumped onto and off of it.

Just to remind you what the game was looking like, I’ve added the last gif below.

Ragdoll time

Let’s start out by looking at how I made a rag doll.

The first thing I did was create a simple block out of what i thought a monkey looked like. I googled some cartoon monkey images and used them as a rough reference and ended up with something like this. This is the same monkey you can see in the gif above, the only difference is that it’s in a T-pose to make it easier to bind the meshes to the bones.

The next thing I did in 3DS max was create a Biped. This was done by going to the create tab and selecting the systems icon, then selecting biped and scaling it to the size of my character.

Next came the part that took me the longest to figure out, I needed to link the meshes with the bones to allow the rig to control the meshes. This can be done by using the select and link tool in 3DS Max, its normally located up in the top left next to the undo and redo buttons. To make this process easier, I change the view to show the wire frame of the model. I then selected and linked each mesh to the appropriate bone. You can see some of this process in the gif below:

Now I had linked up the model to the rig, I could export it to Unity to create the Ragdoll

So now i have the updated model in Unity, but nothing happens when I press play. This is because i still need to set up the model to have joints and rigidbodies. Luckily, Unity has a ragdoll feature built in. If you go to the toolbar and go to GameObject>3D Object>Ragdoll… Unity will open up a Ragdoll Wizard.

This Ragdoll Wizard makes setting up a ragdoll super simple. We simple drag in the appropriate transforms for each part of the body. Unity then creates character joints with appropriate masses, rotation limits and colliders to the objects.

Now I have a ragdoll, I can attach it to the tail so it can swing around the branches. I did this by adding a fixed joint to the tail and set the connected body to be the pelvis of the monkey. I then set the rigidbody of the tail to be kinematic. The result of this can be seen below:

You may of noticed that I also added the animation for the branches to this scene. The way that I did it was by first creating the bones in 3DS Max and linking the meshes to the bones. I then took the exported model and created an animation in Unity using the key frame system. You can see the up close result of this below.

That’s all for this post, I hope this helps you out if you are looking at adding Ragdolls or bone based animation to your game.

See you next time,

Ethan

Leave a Reply