Monday, 28 September 2015

Character Dash Update

My targets were to begin researching Oculus Rift compatibility with Unreal engine, select our engine to be used and to also begin prototyping the character's movement in the engine selected.

1) After researching online and seeing video tutorials of Oculus Rift being used in Unreal, we have decided to use it as our main engine, this is also good because the team have experience in using Unreal Engine.

A video of Oculus Rift implementation can be shown here: 




2) My other task was to begin prototyping the character's movement in Unreal. Using the FPS template I was able to tweak the already made variables to get the player running faster and jumping higher. The next step was to create the dash mechanic, where boosters would launch our player in the direction they were moving.

To do this I needed to find out how to apply force to our player on a key press. I was able to find a forum post explaining how to do this:



With this in place, force would be applied to the player when they press the 'left shift' key. However this would apply force in all directions and the player would fly out of the map. After further research I was able to find another forum post demonstrating how to apply force in the direction that the object is already moving in. Using both images I was able to combine them:





With this done the player could now dash in whichever direction they were moving. However the player was able to spam this ability to fly and move incredibly fast. After browsing the forums I was able to find a person who had posted an image online demonstrating how they created ability cooldowns:



Using this image I was able to implement it into the code that I had already created:


Below is a video demonstrating the movement, jumping, shooting and dashing working. If you pay attention to the top left of the video, you can see that when I press the dash key, it prints on the screen that were dashing. If I press it while it's on cooldown, you can see that it prints that the ability is on cooldown:


No comments:

Post a Comment