top of page

And it gets more complicated!

Disaster! Because of a lack of communication there was a misunderstanding between the designers and myself as to how some of our mechanics will work. It was my understanding that there would be four separate mechanics, push/pull, jump, climb, and burrow, however I've found out that my designers have planned for an object that the cat and jump on to also be pushed/pulled around by the wolf! In addition to this my designers would like the cat to only be able to jump half the height it previously could, and therefore the cat needs to be able to jump up two levels. This creates two very tricky problems where I cannot control where the player will place the block when they want to use it, and i need to be able to determine if the player wants to jump up or down. To solve these problems I have created something called a "Node Checker" script.

This node checker functions by creating a small node that is only visible in unities scene view. This node has three important vector 3 variables, Pos is the location referring to the parent object that this node checker is on, Desired Offset is where we want the the node to be moved to in relation to the original position, and Box Size allows us to increase the size of the node for the sake of debugging and ensuring we know exactly where it is by making it more easily visible.

The node checker also has two bools, "useable" which refers to whether or not the current climb area is useable at this moment, and "useable when obstructed" which refers to whether or not a climb areais useable when it obstructed or not obstructed.

all push pull objects now need to be climable as well as having an option to jump up from the ground, back down from on top of this object or up again onto another level. In addition to this the large objects need to only allow the cat to jump down if there is a push pull object there to jump on to.

This is where the node checker comes in handy, for example each side of a climable push pull object has two nodecheckers on each side, one that checks whether jumping down from the middle level is possible and one that checks whether jumping up from the middle level is possible. so for example if there is a pushable object which is next to a higher wall on the left the nodechecker for jumping down here will be obstructed, so we will be able to tell that we cannot jump down here, and the nodechecker for jumping up here will also be obstructed, which will tell us we will be able to jump up as there is something to jump on to.

This node checker script can also be used in some other more easily controllable situations and so far appears to be fixing the issues that have arisen.


Recent Posts
bottom of page