This week I managed to sneak in a few hours towards developing the character control system for “The Button”.
It is trully fascinating to have a static character in game and with a few lines of code bring it to live. Is a great reminder to why I love game developing so much.
We are once again going for the basic controls approach however, this time with a couple of extra keys, Left and Right arrow keys. For those of you that are big fans of the W-A-D-S keys might be happy to know that will also be cattered for. We are listening
“The Button”‘s main character now responds to left and right movement and rotation as well as jumping.
To test the new system, We have started with a basic environment as shown on the image below:
I have learnt that updating “transform.forward = directionVector” will move the character but won’t move his collision. The character would move straight through the block in front of him. To fix this we have to use “controller.Move(directionVector)” where controller is the character controller component.
Ollie has created the walk and run cycle animations which I have now implemented in the game. The code and animation combination does give the character more personality.
We are yet to implement the “duck” control.
Another system that hasn’t yet be defined 100% is to trigger the walk to run since we only use one key for both. One way to do it is by increasing the speed as the key is held down.
If you guys have any suggestions let us know
If you guys have any suggestions let us know
Here are the game controls:
Left arrow / A press – turn left
Left arrow / A key down – move left
Right arrow / D press – turn right
Right arrow / D key down – move right
Up arrow / W press – jump
Down arrow / S press – duck
I will end this post by giving you guys a sneak preview of the animation cycle. Let us know what you think!
Helana


Cool! Have you guys ever played Tomena Sanner on Wiiware? If not, you should get it!!
Ah, hadn’t seen this one. Thanks for sharing. It’ll be useful reference.