We're going to wrap up our project here by making a little congratulations message that
pops up when our lid is finally opened.
So first we'll actually make this message and then we'll enable it using our box manager
script.
So let's do that.
I'll make our message, our congratulations message as a child of our box game object and
we'll make a 3D object a text mesh pro and those always start off being a little big
but we'll shrink it down and first we want to flip it so it's facing the right way.
We can do that by typing 180 on the y rotation there and we'll center this and shrink it
down or maybe we'll just scale the whole object down.
That'll probably work a bit better.
We'll just put this in the appropriate place and we'll say you win.
Congrats.
Maybe I'll bold it, make the text a little bit smaller and there we go.
That should work.
And in the last section we learned about annotation interactables, right?
So if we add one of those then this text should actually follow us around and only appear when
we're looking at it.
So let's try that.
We'll make an annotation interactable.
We can add itself as an annotation here.
This is its own annotation visualization.
We'll make the max annotation range like 10, our max FOV offset.
I'd say that we should see this at maybe 180 degrees and this says the maximum angle
in radians off of FOV horizontal center to show annotation.
So let's try putting three radians which is about 180 degrees but I just realized our
forward arrow is actually pointing the wrong direction.
So maybe instead of making this object directly the annotation visualization, what I'm going
to do is create an empty parent.
Call this win text and let's just make it so its text is in the same position as the
parent and then we'll move the parent up.
And the reason I'm doing this is so the blue arrow is facing forward because I'm pretty
sure that's what we'll want and let's instead of having the annotation interactable on the
text we'll have it on this text parent here.
Paste component is new, there we go.
Win text, the annotation interactable is itself, there we go.
If it wants a collider I guess to be able to tell whether or not we're looking at this
win text so we'll give it a box collider and we'll just shrink that down a little bit.
Oh, it's just a little bit oversized there on the text.
There we go, now it has a collider and we'll add that to the list here and now we have
an annotation interactable.
And what we're going to do is turn this off so we don't see that text right away.
Instead we want our text to appear when our box manager decides that we've won the game.
In the next video we'll work on hooking that up.