top of page

Fixing Wander AI & refining prophunt base

  • zm02stor
  • Sep 28, 2022
  • 3 min read

Updated: Sep 29, 2022

[22 - 24/09]

I got a new device and had to transfer my files over to it. As a result unity had an update and is no longer 2019.1.1 but 2019.4.4. Transferring files took a while (manually created a new game and added scripts and objects again.) During this time no development occurred.#


[25/09]

Modelled a basic fish for the bait:




[26/09]

Was able to fix the wander AI through initialising the wander target before setting it to a randomised point. The cat is now able to wander around smoothly. A larger radius means a smoother movement, having it too small will cause the movement to be jittery. The wander speed should also be kept smaller than the seek and flee speeds.



Wander AI:

[Link if video doesn't load: https://youtu.be/ftb-Yez7XQ4 ]


Wander AI with substituted basic cat model:


[Link if video doesn't load: https://youtu.be/V4Mr7oC2hsg ]


During this time I also tested out seek AI (using the cat and player where the cat will seek the player at all times). The cat does follow the player around, but the object itself rotates towards the player:




I tried to freeze the rigidbody's rotation so it stops rotating - this had stopped the strange rotation. It does still rotate to face towards the player but if it collides, then the cat will begin rotating strangely again. The rigidbody component cannot be removed as the wander AI is dependent on it and the cat needs physics to interact with the rest of the objects in the level.



The bait is now limited and the player cannot spam the bait once it has run out

Added a simple UI to display remaining bait

Added an object to replenish the number of bait that the player has currently



[Link: upload to yt and add link here]


Cat wandering correctly around the level (not the model orientation):




[27/09] - Continued working on the Prophunt mode

Added a UI to show which prop the player is currently playing as.




There are however some problems, the first item in the list in item cycle is set to be inactive at the start of the game which means that the player never gets to play as the first item in the list since the code for changing into one deactivates the current prop. The same happens with the UI display.


The game runs without having an image in the first index, but it shows white (base image for the mask) the whole time which needs to be fixed.

There are to methods to do so:

1. Change the UI to display the NEXT changeable item

2. Change the UI to somehow hide for the duration of the time it is gone

If the UI is to display the NEXT changeable item, then it would need to be displayed at all times. Whereas if it were the other way around, it would disappear, having it disappear on and of the screen might cause confusion for the players since it will continually limit their view.


A cooldown is needed to prevent players from repeatedly changing into a prop as this would be disadvantageous and unfair to those posing as the owner.

The UI will later have a cooldown which goes down in a wheel and displays the time left till the player can transform into a prop again.


The basic model was created on the 13th of September and is still a work in progress. I will use November to create necessary assets and refine them. Below are some screenshots testing out the rig, with some poses for playing with a toy and licking:


Cat Licking:


Cat playing:

Goals for next time:

- Refine Seek AI

- Add a dynamic line of sight (or cone vision)

- Add a cooldown to the bait throw (so player cannot throw bait immediately one after the other)






Recent Posts

See All
Adding a player base

The player still did not have a safe space where they could stay in, or where the cat's cannot run into during their wander state. I...

 
 
 

Comments


ZAHRA MIAH

©2022 by Zahra Miah. Proudly created with Wix.com

bottom of page