Tuesday, 9 September 2014

2D Character Controller Improvements

I spent today improving my 2D character controller from yesterday. 

I have now coded a way for the player to pick up a certain power-up that lets them destroy objects in the scene. 

I have also stopped the issue that made the character 'stick' to walls if a directional button was being pressed by creating a 2D Physic Material that gives the character 0 friction while he is not grounded. 







I have fine tuned the punch/attack script to allow the punches to use 2d Colliders and 2D Rigidbodies without interacting with the player. I did this by making the actual colliders only cover the very front of the attack instantiation. 















I also successfully recreated my climbing script from the default Unity Character Controller. I reduced the complexity of the code as well.

Sunday, 7 September 2014

Character Movement for 2D


I have created a new controller for the character. I have made this new controller so it will interact better in a 2D environment. Previously I used the default Unity Character Controller to control the character. While this worked for a while it soon became apparent that it was not optimized for a 2D platformer.