Wall Wrapping

All right, welcome back. Today we’re going to be working on building that those outer walls, those outer dimensions. So let’s first build a blueprint actor. Call it BP wall. Alright. And inside here we are going to be putting in a plane. So just do plane. And that color is fine. It doesn’t matter. We’re going to be hiding this in the future. So let’s scale this to 35. One way. All right. Looks good. Okay, save. And now we actually don’t need the Begin Play or the event sick. We can remove that. And we’re going to do our first setup here. We’re going to be cast to BP laser and we’re going to destroy the laser So we don’t want the lizard to carry over when you fire it and then we’re gonna do another one where we’re gonna cast to BP player ship and put it the other actor. And this one we are going to do target get ship and set world location and we need to actually get that new location here. So we’re going to build a new construction script, we’re going to create a new function, we’ll call it wrapping location. Now inside here, we are going to go ahead and do a line trace by channel. Main trace by channel Okay, and then we are going to bring it out to the return node and doesn’t look like there’s one here. Just type in add return node, and we’re going to add an output here. We’ll call it a location and make a vector input wrapped object. Make that an actor. Excellent. Okay, so moving back over here we’re gonna do get velocity. And then we’re gonna negate that velocity, multiply it by 500. And that will be our end and then get velocity will be our start. Then we’re going to do trace channel by wall. And then that should be it. So now we’re going to place that on our world. So in our world, we’re going to have a couple couple of them. So let’s go here. Let’s hide the sky map. Let’s place one down, place, two for now, and then we’ll line everything up. So the first one we’re going to do is VP wall, the first one, location 90 up sorry, rotation, 90 location 24 zero. And then we’re going to scale this just a little bit. Our next one BP wall two, is going to be 2400 negative 90 euro 1.25. So now we got top bottom, and then we’re going to drag in two more. So let’s just duplicate these. For BP three. We’re going to do negative 1800 with a Z of 20. You know what, let me make sure I think we want 24 all of these. Yeah, we do. Sorry about that. 24 all four of them. And then we’re going to do a rotation of 90. There we go. 99 days 91.4. And then BP wall four, we’re going to do positive 90 negative 90 1800 zero. 1.4 and why is this one? What did I do here wrong? Ah, zero. Great. So now we actually have the boundaries. So let’s put that that Earth back into a good boundary there. And then let’s save and hit play. Pay you can see our boundaries. Okay, so we need to set up the collision next. But something’s going on with our boundaries here. Why is the planet not showing? That’s interesting? Let’s take a look here. Is it out of bounds? Or do we simply have it too high up? Yep. That’s why This place to high up. So that should be good Fairmount. All right. Excellent. live over there. Now we got a floating Earth. Let’s just make sure the boundaries Yep, the boundaries aren’t working. That’s fine. So let’s go ahead and move these two boundaries a little over a little bit more let’s do 3000 and 30,000 Let’s see if the boundaries show up. Okay, perfect. So there they look to be out of the screen. Now we need to set up the collision. So go back to the BP plane or sorry BP wall and go to the plane and let’s set it up to simulate collision. events do custom query only world static and then we’re gonna have an overlap few. block on wall and block projectile. Excellent. Now if we go through interesting, so we’re not seeing anything come in. Let’s move that in. Let’s take a look. The ship actually going through it. I believe so. Yep. Okay. So let’s take a look here and see what we’re missing could be something very simple Take a look at the BP wall when it is running. Ah, here we go. So we needed to make the change here and then we forgot to get wrapping location here. Good wrapping. Or sorry What was it called? rap King location and then that should be it. Let’s take a look again nope So let’s take a look. I never did any location. We do a cast failed on that fails the cast. There we go. Excellent now is going back to the center location. Okay, so let’s go over here. Let’s make sure that this is set at three 3000. Yeah, that’s pretty darn close. Okay, great. So let’s go ahead and change this back to negative 3000 hits Play. Unfortunately, it’s going to the center of the screen and we don’t want to go to the center. So we just need to take a look there and see what’s going on. Okay. I believe I know what happened. We go to BP wall and we go back to our rap location. I never set the new location here. Oh, there we go. Great. Hit result. Do location. There we go. Now it’s going to do the end piece. It’s gonna negate, sorry, it’s gonna grab the velocity and that’s gonna be the start negate the vector and then multiply it by 500. And then based on the training The wall is gonna break the hit result, give us an out and give us the new location and that should be the opposite side. Make sure you disable, ignore self. Try it again. There we go. So we’ve just seen it tweak the boundary is this little bit. So I’d say 2800, negative 2800 here, and 2800 there. And if we were to do a standalone game of this, just to get an A general idea of what it would look like All right. Great. So we need to bump up that light. So that’s for sure. So we want to do let’s do 10 Lux. Excellent. Look at that. Hey, we’re getting, we’re getting a level built. Alright, in the next video, we’re going to actually start building those asteroids.