Sunday 1 November 2015

Swimming

Swimming was a feature i decide to put in after creating a the Water material. Originally I was going to restrict the players movement but stopping the from walking off the edge of the cliff side but creating a camera animation that made it seam as tho the Virtual Character that player controlled from stopping them self and the player from walking them of the ledge. This However an interesting way to prevent player mobility without invisible walls was just too complicated from task and would have been very buggy.

Instead i decided to try out something implementing a feature I've always wanted to work out and that is swimming. I've never before made a game or level with Character functionality like swimming who ever ive always wanted to know how it could be done. To also scratch of to the things i hope to one day learn is creating an underwater shader and effect which would be necessary if I'm able to implement swimming.



As it turned out unreal had alot of the functionality set up and ready it was just my job to implement it and make sure it was all working. The First part in the set up was to designate what areas where swimmable. This Was done by creating a Physics volume that occupies the area i want to be swimmable, when the player enters the volume a variety physics settings are allied to the players movement.



The next and final step was to allow the player to utilize the movement settings. This is done by first enabling swimming on the Movement component of the player. This will allow the players swimming function once inside the Physics volume to be enabled. Then the settings will be applied to the player for the function to use so that the player moves in the desired manor. This Method mean that you can have a variety of different physics volumes for different viscosity of fluids meaning different movement behaviors when inside each. 


No comments:

Post a Comment