Hi all! Continuing on with my 3rd person platformer unity demo game, this time I upgraded my camera system! Previously, I had 'fixed' my last bug with friction of the player on objects in mid-air, but I actually missed out what would happen when jumping against a wall whilst grounded. This time, I fixed that. The additions I made included a new camera mode, a method of swapping between to modes, and upgrading the default camera mode! Normal mode now features collision detection! The camera zooms in with some padding when colliding with with a wall. The new NSEW Soft-Lock mode locks the camera to either the north, south, east, or west angles. You can then rotate around the player only in 90 degrees whilst in this mode, snapping to the closest cardinal direction at the moment you enter the mode. Checkout the video below for a much more detailed look into the system, what it can do, and the code behind it!
2 Comments
Hi all! Again I'll be continuing from last time, with a new addition to my 3rd person platformer unity demo game. This time, I created an opening door sequencing! Last time I still had the issue of friction against wall when in mid-air, as featured in the 1st player avatar demo post. This time around, I fixed it! It was a quick and simple fix that just used the ground check function to check if I was in mid-air or not. If I, as in the player, was in mid-air, then its rigidbody would have its material set to have no friction. This meant I'd just rub against surfaces like no issue. When the player is grounded, it adds friction again so that it can walk around normally. Enough with bugs, on to the new stuff! I added a door, a door button, and a sweet cut-scene that plays out when you press the door button. Checkout the video below for a much more detailed look into the system, what it can do, and the code behind it! |
AuthorHi, I'm Conrad Wilson. a Games Developer & university student at UWE Bristol. Archives
April 2020
Categories |