Our Games: 

All Blog Entries by Tag

Importer for secondary mesh collider

For our game we have an asset post processor in Unity that auto create a mesh collider using the object rendering mesh. This work great and it's really easy to do, on the OnPostprocessModel(...) function just add the following code:

For example this show the mesh collider we automatically get for an imported object:

 Sometime we do want to have simpler mesh collider for object. The example above is something where we would like a simpler mesh collision, as much of the details in the object don't really need to be part of the mesh collider. For this in 3dsMax we create a child object whose name start with "AltCollision",  This is how the hierarchy would look like in Unity and how the AltCollision mesh looks like for this example:

What we want to do is delete that AltCollision object at import and use it's mesh as the mesh collider for the parent object. We do that with the following code (run after the previous code that generate MeshColliders)

With altCollisionRegexExpression being:

Now when we import our game object the renderer and the mesh collider are set to use 2 different mesh, and the AltCollision object is deleted:

In our case this allow Cat now to easily add simpler mesh collider for geometry that might be problematic with the movement system, like for the following stairs, without having to leave 3dsMax:




Quick overview of our assets processing in Unity

We moved from a modular design to one where most of the level is done in 3ds max. The best way for this to work was to use the unity AssetPostProcessor functionality, I hope this blog post might be useful for other people thinking of doing the same.

Click to read more ...


Setting up the Plastic SCM client for use with Unity Project


Setting up a Plastic SCM server on an Amazon EC2 Instance