HUD - Animation #1

11 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€93.80
List Price:  €131.33
You save:  €37.52
£80.29
List Price:  £112.41
You save:  £32.12
CA$137.56
List Price:  CA$192.59
You save:  CA$55.03
A$155.72
List Price:  A$218.02
You save:  A$62.29
S$136.13
List Price:  S$190.59
You save:  S$54.46
HK$783.15
List Price:  HK$1,096.44
You save:  HK$313.29
CHF 90.82
List Price:  CHF 127.16
You save:  CHF 36.33
NOK kr1,103.56
List Price:  NOK kr1,545.03
You save:  NOK kr441.46
DKK kr700
List Price:  DKK kr980.03
You save:  DKK kr280.02
NZ$169.65
List Price:  NZ$237.52
You save:  NZ$67.86
د.إ367.23
List Price:  د.إ514.13
You save:  د.إ146.90
৳10,973.26
List Price:  ৳15,363.01
You save:  ৳4,389.74
₹8,346.81
List Price:  ₹11,685.87
You save:  ₹3,339.05
RM478.30
List Price:  RM669.64
You save:  RM191.34
₦129,687.03
List Price:  ₦181,567.03
You save:  ₦51,880
₨27,846.09
List Price:  ₨38,985.64
You save:  ₨11,139.55
฿3,684.97
List Price:  ฿5,159.11
You save:  ฿1,474.13
₺3,259.29
List Price:  ₺4,563.14
You save:  ₺1,303.85
B$524.14
List Price:  B$733.82
You save:  B$209.68
R1,920
List Price:  R2,688.08
You save:  R768.07
Лв183.64
List Price:  Лв257.10
You save:  Лв73.46
₩138,024.19
List Price:  ₩193,239.39
You save:  ₩55,215.20
₪378.55
List Price:  ₪529.99
You save:  ₪151.43
₱5,756.02
List Price:  ₱8,058.66
You save:  ₱2,302.64
¥15,447.20
List Price:  ¥21,626.70
You save:  ¥6,179.50
MX$1,726.94
List Price:  MX$2,417.79
You save:  MX$690.84
QR366.07
List Price:  QR512.51
You save:  QR146.44
P1,385.95
List Price:  P1,940.39
You save:  P554.43
KSh13,348.66
List Price:  KSh18,688.66
You save:  KSh5,340
E£4,832.56
List Price:  E£6,765.78
You save:  E£1,933.22
ብር5,710.80
List Price:  ብር7,995.35
You save:  ብር2,284.55
Kz83,585.80
List Price:  Kz117,023.47
You save:  Kz33,437.66
CLP$96,622.33
List Price:  CLP$135,275.13
You save:  CLP$38,652.80
CN¥724.04
List Price:  CN¥1,013.69
You save:  CN¥289.64
RD$5,929.75
List Price:  RD$8,301.89
You save:  RD$2,372.13
DA13,457.15
List Price:  DA18,840.55
You save:  DA5,383.40
FJ$227.57
List Price:  FJ$318.61
You save:  FJ$91.03
Q780.47
List Price:  Q1,092.69
You save:  Q312.22
GY$20,930.40
List Price:  GY$29,303.40
You save:  GY$8,372.99
ISK kr14,100.58
List Price:  ISK kr19,741.38
You save:  ISK kr5,640.80
DH1,016.63
List Price:  DH1,423.32
You save:  DH406.69
L1,790.82
List Price:  L2,507.22
You save:  L716.40
ден5,785.11
List Price:  ден8,099.38
You save:  ден2,314.27
MOP$806.50
List Price:  MOP$1,129.14
You save:  MOP$322.63
N$1,910.91
List Price:  N$2,675.35
You save:  N$764.44
C$3,692.82
List Price:  C$5,170.09
You save:  C$1,477.27
रु13,360.74
List Price:  रु18,705.58
You save:  रु5,344.83
S/376.13
List Price:  S/526.61
You save:  S/150.47
K381.31
List Price:  K533.85
You save:  K152.54
SAR375.08
List Price:  SAR525.14
You save:  SAR150.05
ZK2,557.08
List Price:  ZK3,580.02
You save:  ZK1,022.93
L466.85
List Price:  L653.61
You save:  L186.76
Kč2,369.96
List Price:  Kč3,318.04
You save:  Kč948.08
Ft37,031.68
List Price:  Ft51,845.84
You save:  Ft14,814.15
SEK kr1,094.85
List Price:  SEK kr1,532.83
You save:  SEK kr437.98
ARS$86,967.11
List Price:  ARS$121,757.44
You save:  ARS$34,790.32
Bs693.40
List Price:  Bs970.79
You save:  Bs277.38
COP$389,858.15
List Price:  COP$545,817.01
You save:  COP$155,958.85
₡50,274.61
List Price:  ₡70,386.47
You save:  ₡20,111.85
L2,477.26
List Price:  L3,468.26
You save:  L991
₲742,412.64
List Price:  ₲1,039,407.40
You save:  ₲296,994.75
$U3,872.48
List Price:  $U5,421.62
You save:  $U1,549.14
zł405.79
List Price:  zł568.12
You save:  zł162.33
Already have an account? Log In

Transcript

All right, welcome back everybody in this video we are going to work on creating some HUD animations. We've got a HUD layout in place, we have bound some variables to our HUD. But if I click the play button up here right now, you will notice that our HUD just kind of magically appears on screen and that's not very cool. A lot of games have these HUD elements, you know, flying in from the the outer edges of the screen, or fading into existence, that sort of thing. So that's the kind of thing we're going to be working on over the next few videos here. Now I'm not going to animate all the different HUD elements in this one video.

In this video, I'm going to be focusing on creating a HUD animation for the upper left hand portion of our HUD that is our player portrait and health information, that kind of thing. So to get us started here, make sure you find your way over to your W b p HUD. That is in the content Metroidvania widgets folder. Let's open this guy up. And to create an animation for your HUD elements, you need to come down into this bottom left area of the editor here where it says animations and we want to click this green plus animation button. And I'm going to name this animation, HUD left intro, this is going to be the animation that we play for the left most portion of our HUD.

Now with this animation is selected, I now then get to decide which various widgets here I want to be included with this animation. This animation is going to be called in some script that we create a little bit later on. So the first thing I want to animate here is going to be our portrait background widget that is going to be this kind of Pink in black ink stroke in the background. And the way you can add these things down to in in your animations timeline is to click some of these little buttons here that's kind of a diamond shape with a plus button on it. And when you do so, it's going to add your portrait background down to your timeline where you can modify some of these properties over time. Now before I add our portrait background down here into our animation timeline, I'm going to modify our position y, the default position.

I set it in these locations, all these widgets in these locations to get a started because I wanted you to see where the final position for all these widgets is going to be when we finish. Now that we're going to start animating some of these things, I'm going to start changing some of these initial positions. Okay, so with our portrait background widget selected, come under the Details panel. And we're going to change the position wise default from negative 50. I'm going to change that to be 100. So it's going to start down there.

I'm also going to change the initial capacity of it. So if I scroll down here, there is going to be color and opacity, this a value, I'm going to change that to be zero as in we are not going to see it at all at the very beginning. Okay, and then if I scroll down further as well, under my scale settings, scale, X and Y under render transform, I'm going to set the default value for this to be 0.5 and 0.5. Okay, again, you can't see it right now. But don't worry, we're going to fix that here in a little bit. Okay, so then jumping back up to We'll go up to our position why here, I'm gonna click this little icon here when I do, notice you got to have HUD intro left selected, and your portrait background selected.

Position why click this little button right here, it's gonna add a keyframe for this property to our current animation. So down here in our timeline, what you now see is we've got our portrait background, listed under our timeline. And if I click this little down arrow to this, this little triangle to show the properties, you can now see that I've got my negative 35 103 50 and 315 values that match our position y or position x position y size x in size y settings. Now one source of confusion here that I wish unreal would fix this up. You will notice that position x of negative 35 is equal to what is now labeled left in the timeline. Likewise, position y of 100 is now labeled top in the timeline, which I find to be highly confusing and many people do.

But just know that that exists so you don't get to confuse. Okay, so what you see down here is this is this little red.net represents a keyframe on your timeline. And so right now our timeline is basically zero seconds long. And the way you can expand this out is you can grab this little right section right here to expand out this timeline like so. Now, we're going to make this a relatively short animation and I don't really want this to be 1.2 seconds but to shrink or expand your timeline right down here, you can hold down the Control key mouse wheel in to kind of expand it out like so. Okay, so at this time of zero, I do want our top property for our portrait back round here to be 100.

And if I was to right click on this keyframe, I could come under properties and see that it is at a time of zero and the value is 100. Okay, what I'm going to do next is I'm going to move our timeline, you can grab your timeline, drag it over like so. And by default, it's snapping it every point 05 seconds, which is fine. I'm going to move it on over 2.4 seconds, that's four tenths of a second. Now, if I click this little plus button right here, I can add another keyframe for this property, this top property which is the equivalent of our let me select portrait background, our position Why? Okay, so we've got top selected, let's click this little plus button with our timeline at 0.4.

That's going to add a keyframe. And now what I can do is with our timeline right here over this keyframe, I can change The value of this and I'm going to change it to be negative 50 right here. So you can see over the course of four tenths of a second, it's gonna slide up like that. Okay, now I'm going to move our timeline over to and I could right click and drag at this point in the timeline. If I right click and drag down here, so you can drag that we left click on our little timeline slider, move this out to one and a half seconds, at one and a half seconds. I'm gonna click this plus button to add another keyframe.

And you can see that extended out the the, the bounds the endpoints of our animation here all the way out to one and a half seconds. That's what this little red line represents here, the end of our animation. So then make sure you move your timeline slider here to one and a half seconds and we are going to leave that value at negative 50 So the idea here is that this particular element, we're gonna slide up like so over the course of one and a half seconds. Okay, that's not all we want to do here. I do want to change the opacity settings for this background as well as portrait background. So I'm going to scroll down in our details and find your color and opacity.

Make sure you've got your timeline slider back to zero seconds. And then I'm going to click this a button. Click the plus button right here. And now you can see I've added color and opacity to my timeline. Okay, so now I do have three keys. I want to say here, this first key is that time zero value of zero.

I'm going to move my timeline slider again like I do to the point four, seven. Get mark, I'm going to click the plus button right here to add a keyframe here at four tenths of a second, I'm going to set this value to be one. And you can see that makes our image show up in the background there. Then I'm going to move the timeline slider all the way to one and a half seconds, and I'm going to change I'm going to add another keyframe right here as well, to maintain that value of one. Okay, to kind of see how that's gonna kind of fade into existence right there. Okay, and you're kind of getting to see my workflow here as well.

So I'm gonna change one more thing about this portrait background. Let's move our timeline slider all the way to the zero second mark. Let me just create a little bit more space here. The next thing I want to modify over time is our scale settings for the portrait background. So find your scale settings, click this plus button right here to add a key for it. Make sure your timeline slider is at zero.

And now we've added this section. To our portrait background timeline, expand out this triangle, and it's already got a keyframe there for our scale. And I'm just going to expand out our scale here and shows the x and y scale simultaneously. Okay, so at zero seconds here, I do want the scale to be 0.5. Now I'm going to move our timeline slider to four tenths of a second, and here I'm going to change our x&y scale to be one and one. And then I'm going to move that slider all the way to the one and a half second mark.

I'm going to click the plus button here to add keyframes for the x and y and I want to keep it at one and one. So now you can see if I scrub through this. What's gonna happen here is it's gonna kind of fade into existence and pop up like that. Now you see how it does that little bounce right there. I don't want it to do that. So a way I can get rid of that is by left clicking right here.

Left click and drag and highlight all of our keys. And then if I right click on any of those highlighted keys, I can set our key interpolation from auto to linear. And that'll make it so that that little bounce doesn't happen. So now you're going to get an effect that looks something like that. Okay, so that's all the animation we want to do for our portrait background. Next, we're going to affect our health background.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.