Tuesday, 14 March 2017

Belated Surprise... From Yellow Rabbits!

Among plenty of other assignments, we managed to pool some time to work on our VR game. Stressed? Sure. Tired? Probably. But I personally had quite some fun sluggishly implementing these cute little monsters! As I first started working on these roaming rabbits, I spawned quite a handful and it looked like they were having a heartwarming party.


Their adorable appearance and problematic harmlessness filled me with determination... And bundles of joy whenever I add life to them. It wasn't all fun and games though as I watched this little thing refuse to walk inside the castle and ponder its existence.


Realistically, I realized it's a problem with the terrain's NavMesh bake settings. Agent radius and height were meant to specify how small the character is, deciding what gaps they can traverse. Yet it turns out a value too small stops them from even going in. Here's an excerpt from Unity's website (https://docs.unity3d.com/Manual/nav-BuildingNavMesh.html):

  • - Agent Radius defines how close the agent center can get to a wall or a ledge.
  • - Agent Height defines how low the spaces are that the agent can reach.
Somehow when I increase the value from decimals to 1, the rabbit no longer has problems walking in. Here's how the terrain's NavMesh looks like afterwards.


Notice that the "squares" are much bigger now? As a side note, I also made the castle a static object in this screenshot. Now rabbits happily roam somewhat aimlessly, then comes and hurt your player! Great...

After that's done, I revisited the violet ghost. They walk a straight line to the castle and does a sacrificial attack. Why? Because currently the positioning of the player and the castle underneath makes it not very fun to hit things right beneath you. I'd much rather add a poof effect to the ghost instead of letting it die in agony though!

While I was working on this, I made a mistake and gave this violet ghost a bit too much power.



Game over in one shot. Definitely intended! (No worries, I fixed it.) 

That summarizes most of the funny interesting bits I captured. As a parting gift, I'll leave you with a sneak peek of our progress. :)




No comments:

Post a Comment