Sunday, October 18, 2015

Navigation Meshes and Crowd Simulation

As a part of our course project, we were asked to  design a relatively complex environment using different obstacle configurations for crowd simualtion.

Our environment consists of a scene with two levels,  navigation static containers(on top of which agents can move/jump), multiple bottleneck areas.

We created an "Agent" prefab with NavMeshAgent component to allow agents to navigate in
the environment while using the navigation mesh and then created a script to select agents and specify which destination to navigate towards. For this we capitalized on the concept of Ray Casting.


The next part of the project, was to get a good grip about Unity's Mecanim Animation System and
create an animated human character using Mecanim.
This was done by taking a humanoid character, importing  its animation data onto the humanoid and then create an animation state machine to have him walk, run, jump. A controller script was created where a player can control the character using arrow keys,run modifiers (shift key) and SPACE to jump.
A “third person” camera is implemented and attached to the character to give an RPG feel.


In the last part, we integrated our prefab into our crowd simulator to create a crowd of directable animated characters. Double right clicking the destination will make the agent sprint towards it.

Please click the following link for the web deployed version of our Game,
https://dl.dropboxusercontent.com/s/dedu824xex8kdsw/builds.html

P.S Please use Mozilla Firefox for best results.

No comments:

Post a Comment