Player Death FX - Screen Shake

A free video tutorial from Greg Wondra
Unreal Authorized Instructor
Rating: 4.7 out of 5Instructor rating
8 courses
30,246 students
Player Death FX - Screen Shake

Lecture description

This video will show you how to add a screen shake effect when our player dies.

Learn more from the full course

Unreal Engine: Create an Arcade Classic!

Like "Fortnite?" Master the tools used to build it as we re-create an arcade classic using the Unreal Engine.

26:26:16 of on-demand video • Updated November 2023

Understand how to download, install, and setup a project in the Unreal Engine
Build levels, create materials, customize particles, and edit sounds in the Unreal Engine
Script interactive gameplay elements utilizing Unreal Engine's Blueprint Scripting tools
Layout, animate, and give functionality to custom-made menu screens and in-game HUD
Create a COMPLETE gaming experience from scratch!
English [Auto]
Hello again in this video we are going to make the screen shake when our player dies. So let's get right to it. I'm going to come into our content arcade classic blueprints and we'll go into the miscellaneous folder and we're going to create a new blueprint in here. So go ahead and Right-Click we're going to create new blueprint class only this time we're going to click on this. All classes little drop down arrow right here and in the search bar we are going to do a search for camera shake right here camera shake and then you selected and we're going to call this BP underscore. Get Cam shake with this blueprint is going to allow us to do is to specify how we want our camera to shake. So go ahead and double click on this to open it up and over on the right hand side. This is what we wanted deals all these oscillations settings that we have available to us. So for the oscillation duration I'm going to make this the point to five point to five seconds the rotation oscillation. Let's open up some of these guys. Let's change the pitch to have an amplitude of five and a frequency of 15 will leave this offset is random will change the yaw under rotation oscillation to be 5 and 50 and then location oscillation will expand that a little bit in any direction will change the amplitude to be 100 and the frequency to be one and we will change the. And we'll leave the Y alone for the Z. We will change the location oscillation to be scanned for the amplitude 50 for the frequency and we're not going to do any f o v oscillation we're going to give this a try as is looks compile and save and if you really want to see how these impact our camera shake I would encourage you after we're done with this particular tutorial to go back in and adjust some of these numbers one by one and then jump in and play and see how it affects things. OK so it's not enough for us to simply have this death camp shake. What we need to actually do is call it for it to play. So I'm going to jump into our game mode game play blueprint right here and I'm going to come up. Sorry not our game of game play blueprint our player blueprint. There is some stuff I want to talk to you back in here. Eventually and let's find our player blueprint and right here where we have our player death animation we want something to happen when this death animation has finished. And remember this whole thing last for one point seventy five seconds so I'm going to drag a wire off of here and I'm going to do a search for play world camera shake. There is a function specifically for this and because this essentially plays after we're finishing our death animation I'm just going to kind of places over here and I'm going to double click on this wire a couple times just to create some reroute notes to kind of make it appear like it's playing at the very end here. OK. And what we need to do now is specify a shake so you can click on this and choose the death camps shake that we just created. And now we need to give this an epicenter. This is where we want to play this world camera shake and I'm going to choose a value of x 0 y 230 Z three thousand three hundred three thousand and I'm going to choose the outer radius to be 1000. So why did I choose these values. The reason I chose these values is because if I come back into our game mode gameplay blueprint which I mistakenly was in before in our game play camera that we are kicking off when we play press play. We are eventually moving our camera location to coordinates to 30 and 3000. So we are saying back in our BP player that we want our camera shake to have an epicenter right where our camera is going to exist in the world. So let's compile here let's say if let's play and get this the test the camera shake there. Now when we die. So let's go ahead and place a comment box around this left click and drag it. That's the key. We'll call this death camera shake let's color this green compile and save one more time and we are good to go. All right that's going to do it all for this video. We will see you guys in the next one.