Head to your content browser, right-click and add Physics > Physical Material. Next, we’ll need to set up some “Physical Materials” which will refer to the surface types we added to our project settings, and then assign them to our floor materials. For mine, this was Carpet, Snow and Tiles. Type in the different surface types you want to model in your project.Go to your project’s Edit > Project Settings Screen.To add new surface materials to your project: In this instance, I was really only interested in the flooring materials. In order to do this, we first need to let UE4 know what material types feature in the level. Unreal Engine 4 allows one to associate physical material types with shaders – so a snowy material can tell other systems what it’s made of (snow I guess) a wooden floor can be categorised as wood, and a cheesy material can behave more cheesily when interacted with say if you wanted to model the lunar surface. My first person character doesn’t have a player-model so the footsteps would need to run on some sort of timer, rather than being tied in with animation notifies.We want the frequency of the player’s footsteps to speed up and slow down as they increase or decrease speed in-game.We want to play footstep sound based on the surface type detected, at the point of contact of the player’s feet and the floor.We want to track what the player is walking on, by detecting the surface type below the player’s feet.Here’s a look at the approach I used for the First Person Character Blueprint – I expect there are better ways out there to achieve this, but this was quick to add, and pretty convincing. It turns out that this is straightforward using UE4 blueprints.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |