Sunday, October 18, 2015

Assignment B1

Part 1: Navigation

User Guide:
Agents (White Capsules):
Click agents (can click more than 1)
Click movement destination

Obstacles (Blue Cylinders)
Click Obstacle
Use up, down, left, right arrow keys to move across simulation
Clicking anything else with the mouse will disable user controlled movement of selected obstacle.

Link to Part1 download:
Webhosted:
http://gamebucket.io/game/b959c6ed-5472-4120-a6f2-33ffe1d290c8

Summary:
Here a complex environment was created to demonstrate the uses of NavMeshes, NavMeshAgents, and NavMeshObstacles. Agents exist as white capsules which can be moved around the environment by clicking agents (multiple can be clicked in a row), then clicking the destination. The selected agents will move together as a crowd to the selected destination. There also exists obstacles in the form of the blue cylinders. The obstacles carve paths in the NavMesh and can be moved by clicking on them and directing them with the arrow keys. Clicking anything else will end player control until they are clicked again. Offmesh links also exist, enabling agents to cross distances over seemingly empty space to equal level planes or jump down from higher planes to lower planes if the differences are not too high.

Misc. Questions:
Explain the differences in behavior between carving and not carving for NavMestObstacle.
Having a noncarved obstacle makes the default behavior of the obstacle like a physics collider. This means the agents will only avoid local obstacle, making it inefficient since an agent might not be able to get around a set of obstacles. Carving changes things by creating a hole in the NavMesh, thus will be factored in to the bigger path an agent takes.

When and why should the carve checkbox be active/deactive?
You should use carving for things obstacles that can block navigation, but should be able to be moved. For example, a door, or boulder are good examples of objects that should be carved.
However, if you have constantly moving objects like cars or other characters, carving should not be used.

Problematic situations:
1) Carving all obstacles
Carving all obstacles might not be a wise choice if your obstacles are frequently moving. If a moving obstacle does not have “carve when stationary” checked and if in constant motion, this will eat up computer resources as the nave mesh will be continuously updated for the changing holes in the mesh. This is especially true if the carving move threshold is low and the obstacle moves very fast.

2) Not carving any obstacles
If you don’t carve any obstacle, then movements of agents will not be along an efficient path. In fact a path to a goal point may not be reached at all. Consider an agent surrounded by four walls. Creating a goal point outside those walls would cause the agent to move directly towards the goal point and collide with a wall. It would possibly try moving around the box, but would not be able to register that no path exists to the clicked point. This is because, without carving, an agent tries to sidestep an obstacle rather than avoid it entirely.

How an agent can avoid obstacles with non-carving options.
For non moving obstacles, you could put them on another NavMesh layer by declaring the objects unWalkable before baking them in Navigation. You could also adjust the settings under Nav Mesh Agent, such as the obstacle avoidance settings and pathfinding settings.

Part 2: Animation

User guide for animated character:
Move around (arrow keys or ‘w’, ‘a’, ‘s’, ‘d’ keys

Jump (‘space’)

Summary
We implemented a animated human character that can walk forwards and backwards, run, and jump in the environment we created. You move around with the arrow keys and jump with ‘space’. We also added the camera to be third-person to follow the character and is located on its shoulder.

Download: Link to part 2
Webhosted:
http://gamebucket.io/game/c37e37e1-b731-4428-9be7-9e485fe53375

Part 3: Combine Animation & Navigation
Here we put part 1 and 2 together. Now, instead of white capsule agents, we have the animated robots in part 2. Assume the controls of the agents, even though you are using robots (i.e. click to move instead of using the arrow keys).
Download:
Webhosted:


No comments:

Post a Comment