onsdag 10 februari 2016

First try with UnitySteer

This far in the project we have downloaded the UnitySteer package from GitHub (link found below). This package contains several implemented steering methods, for example following a path or avoiding obstacles.

Here is a video of an agent trying to follow a specific path while also trying to avoid the spherical obstacles:

Some problems with this implementation is that the agent sometimes breakes the physical laws and walks inside the obstacle. Also the steering is jagged which does not look realistic. When a human spots an obstacle it doesn't turn the opposite way like the agent seems to do. Instead it turns just enough to not intersect with the obstacle.

A more smooth implementation of obstacle avoidance is shown in a previous post.

Link to UnitySteer: https://github.com/ricardojmendez/UnitySteer

Problems with GitHub

Today we finally solved the problems we had with git.

The problems were that when we merged a clone of UnitySteer into our repository, pushed it and then pulled it on another computer it arised several compile errors in the scripts from UnitySteer. After several tries we managed to solve this problem.

We had a problem with the linking of the UnitySteer scripts in our agent prefab when pulling from git. The script components were still attatched to the agent but they were empty. This was due to some changes in the meta files in the UnitySteer package. When we renewed the UnitySteer package this problem was solved.

onsdag 3 februari 2016

Implementing our own steering to Unity

Today we managed to implement the steering algoritm "seek", by using the technique described on this page, Game Development Understanding Steering.

We also implemented obstacle avoidance by taking advantage of Unitys' built in RayTracing function, the method we used is described in this video, Obstacle Avoidance

Here is a demo on what we have achieved so far

The framerate drops randomly at certain times. This might be the case because our agent model is quite complex and the laptop we ran this on has a weak GPU. For our next iteration we plan on using 2D sprites while in the development stage, to not be limited by our GPU when using even more agents.