Unreal Engine 4 - Make a Game - VR Exercise | Marko Matosevic | Skillshare

Playback Speed


  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Unreal Engine 4 - Make a Game - VR Exercise

teacher avatar Marko Matosevic

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

6 Lessons (29m)
    • 1. Creating the VR Project

      6:04
    • 2. Creating the core mechanics

      4:26
    • 3. Resolve the Hand animation issue

      2:38
    • 4. Set up re spawning of the box

      4:12
    • 5. Setting up the point and time system

      6:24
    • 6. Creating Game Over

      5:44
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

164

Students

--

Projects

About This Class

In this series of 6, we will very quickly go through the process of creating a VR experience where you will need to perform a squat, pick up and object off the ground and place it above your head. 

For more tutorials, please visit http://www.youtube.com/markom3D

Meet Your Teacher

Class Ratings

Expectations Met?
  • Exceeded!
    0%
  • Yes
    0%
  • Somewhat
    0%
  • Not really
    0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Creating the VR Project: how long it's mark maturity. If Markham three d today, we're gonna be creating a VR exercise Squatting game actually like and subscribe to the general really helps me and keeps update this tutorial. This is part one off six. So we're in our epic launcher. Let's launch Let's give it a sec and from here only Click New Project. Let's go virtual reality and we'll ray name this too. I work out there, Yeah, create project and turn our projects being created. Let's go into content. Which reality maps, map control? A map conversion control map. Sorry. So first things first. I don't want any teleportation, so let's select our VR porn and edit motion control from here. We'll bring it up the top here and let's find our inputs. Handle controller Input, Input Action! Grab left, Grab right, Teleport left, Teleport Right, Let's right. Click on those arrows and break link to branch Break. Cling to branch Break link to Brant's So now we can no longer teleport. Excellent. From here, I'm going to sit up three random points on the ground. It's gonna talk in a target point. Let's grab this one and we have one here and move one here from here. Let's grab all three of these and we will got to the top blueprints convert selected components to blueprint class. Bam! And we'll just put this in blueprints and we'll call this BP on school. Random, um, spawning create blueprint. So in hell we've got three random points seen components killed. What we want to do is just for funds ease. For now, I'm going to select things and not do anything. Let's go add a cube and I'm gonna put it in that spot. Let's select this one at in another cube. Uh huh. And it's adding another cube. So now we should have three cubes. That's a little bit We'd let's go. So we've got these two here and should be in the middle. I guess that 00 This is, uh, sorry. That's why 90 over here is where I'm looking at. For some reason, that's should be probably zero, and we will make this X zero Mona's 20. Let's make it zero sorts in the middle. And then when I say this is minus, Nani said, we've got Monos Nanny zero and 90. I want to make these hidden in game and the reason why I just put these. It's just so I can see the three points. They really need to be there. But it's just for my peace of mind. So from here, let's go. The event graph and I'm going to delete those three end on event begin play. I'm going to grab these three points, click and drag him in here. What I want to do is I want a cube for the pickup cube to spawn at one of these places Ren ble randomly as soon as the game starts. So from here, we're gonna go make array, and I'm gonna add the pin twice. So now I've got three pins from here. I want to get this eraser. Let's go get get a copy. And so now we've got Al Ray here and we've got this integer which will determine the place in the array. Now I want to get a random value here, so let's go Random integer in range. So the minimum zero and the maximum will obviously be low too. What? I want to get out of this. I want to get get ah, transformation. Oops! Get world transformation. And now that I've got a value for the world transformation. I want Teoh with this. Let me spawn actor from class. There we go. So let's now bring this over and our Kloss. If we come back into the motion controller, I want to spawn one of these cubes, which is called BP on the school. Pick up Cube. So that's coming, Eva T here, BP underscore, Pick up cute. And so now if I go compile and let's come over to here we've got at Cubes, which are hidden in game, but they still visible at the moment, just his point of reference. We should just probably making life a little bit easier. Let's just scale these. Let's lock the scale and let's just go, uh, one 0.1 and 0.1 compile. And so if I go rather impressing plane now, I go simulate there. There's a cube. Stop. Give me a random point. They're gonna pick anything different. I'm going to click on this blueprint, and I'm gonna push this up. There we go. And we're either really unlucky and all those spawned randomly on this one on the right, But let's try again. Simulate, Stop, play, Stop play. There we go. All right, because on in different And so we see we've randomized the spawn point of this. 2. Creating the core mechanics : how low? It's Markman Torchia from Arkham three D and today we're gonna be continuing our V I exercise game squatting wonderfulness that hurts. We're going to be doing the dilation of the box and the random spawn. So let's not continue into the next section. I want to you as soon as I pick up that cube, I want it to be destroyed once it hits a bounding box above our head. So that's going to kind of squat. Mechanic is we're gonna go down, pick it up, stand up, push up. So from here, let's create our cubes. I'm gonna come up here into the top left and search for classes, and we're gonna put in hopes can't spell trigger trigger box. Let's bring this scene, put it up, and let's go scale this out just so we can Yeah, have our box might be a little bit to loaf for now, but we can work that out a little bit later. So let's now convert this blueprint into a actor blueprint class that will bring them up here. Let's call the BP on the school destroyer off boxes. And so now we've got this box. Let's go straight to the event graph from here. Let's delete everything, select the collision component and come down here on component. Begin overlap. What we need to do is we need to get what is overlapping the box. So I'm going to grab the other actor. And so let's get the name of the object. Get objected name. And what we do is let's just tested print string and what doesn't say that it is. So let's go compile. We weren't simulate, but for either. Let's do via previous and would test this out quickly. And so as you can see that the boxes were being collided. Now let's have a look at the output long, and we can see what we're colliding. Pick up cube. Good, because that's what we're spawning and the motion controller. So what we want to do is as soon as the box hits that trigger box, we want that box to be deleted or destroyed. So first up is we don't want their hand to be destroyed, but we know that what this object name is called. So let's go get name, Get object name. Let's type in. Contains string. Okay. Still, that sub string we will call this pick up. So let's get the name or let's get the name of the object doesn't contain Pick up and we will pass that off into a branch. Okay? Yes, it is. What I wanted to do first is called the drop function saying Ago dropped. Send a message to say, Drop this object So it's get the other actor. And then what I want to do is destroy actor and we'll grab that one. All right, now, let's test this out now because I'm in such a small room, I'm just going to have to move this back a little bit. Very guy. And also, let's go to our random spawn er and rather than 90 I'm going to make this 1 50 Just say their little bit closer together and Martus 50 minus 50. All right, compile unless first play. And as you can see, and as you can see, I put in 50 win. This probably should be in minus 50. There we go. So now we've got out three boxes And you saw that as soon as I put the box into the collision box, my hands stayed as a grip 3. Resolve the Hand animation issue: how low it's market or shift. Markham three D Please make sure like and subscribe to the YouTube channel he keeps up to date with this playlist, and today we're just gonna finishing up and work. So fixing up the hand animation issue that we had from the last session. So let's now find where it's playing that animation. Is it in here? Doesn't look like so let's do this. Grab active function and let's follow it through and the function goes to grab. Actor, get actor Knee hand is valid, blah, blah, blah, blah. Pick up. Okay, what's what's that pick up? All right, So now this is the pickup function. Let's find where this is reference. So if I right quick and find reference, obviously it's gonna find this one. But we want to look through the whole project, so I'm gonna find in old blueprints, bring that over and pick up. Is it this one? No. Is it this one? No, no. Said this is the actual pickup cube baby. Pick up cubes. That's that being responding. BP underscore motion controls that this might be the one that we're after. Um, so let's go grab actor. Let's go backwards. I think this is one we were looking at earlier. No, there we go. So we've got update animation. Offhand. So what do we got? Um attached. Actor does not equal blank or wants to grip is true. It'll be in a grab state. So we need to change this. How can we change? Where does it get changed? If we get back into grab? Actor wants to grip. We want Teoh. I'm going to say grab actor grabbing. Let's go release Actor will probably said that to false. So this is what we want. If we go wants to grip is valid. Is this active? Al it? You know what? It's gonna bypass it. I'm not gonna worry about this one. And let's just delete that because at the end of the day, it's probably not going to be valid, But let's work it out. So now that we've deleted that, let's press play and let's see what happens. Beautiful. Quite a few errors there. And I'm just gonna foul Ford. And in the next section, let's continue on working on the responder and we will make a point point system 4. Set up re spawning of the box: how low? It's modicum Torchia from Arkham. Three day. We're going to continue our squatting exercise game of machine nous in this section. We're going to be working on the responding off the box. Let's come back to the destroyer of boxes from here. When our box is destroyed, I want to send a message to say Reese born. So let's go into our pick up functions. So pick up drop. I'm gonna add in a new one. You function called Reese born object Godspell. It's fun. Better fix that from here. Let's go to our destroyer off boxes. No, actually, yes. And what we're gonna do is send a message to respon object. What I'm actually gonna try and do is I'm just gonna plug that into there. Will it work? I don't think so. I think I might move this around now because it's gonna be hard to destroy actor and they may be spawned. An actor. Let's let's go the other way. So, like this And then dis drew a actor. So what I would do is, um when it collides, it's going to check the name. It'll drop it from the hand. It's gonna Reese born another cube and then destroy vis one instantly. Will that work? I don't think it will. Let's go rather than the target. We're gonna break old lines. Let's create another variable. And we're gonna call this, um, Target Sports and up in the variable top, we're gonna slate actor and actor object reference, compile. Let's put this here and in here. I want to make that visible. So the era came up because it can't find a kind of like the execute herbal for the script. So if we come back into random Spawn are actually first, let's go into blueprint. And now we've got the target spawn. Er, I'm going to press the eyedropper tool and select a random Spooner from here. Let's open up our random spawn dropped the top event graph. And if we go, let's select all this Control V. And if we do what we call it Reese Born now this is a message. I don't want a message. I want the actual execute. Herbal is not listed here. So if we got to class settings and we find our pick up actor interface of the top there, so that's type in pick up actor interface. And now I press compile and a better press compile up here as well. Let's go when we say responder event, respond. Object. And so what's gonna happen? He's every time that box collides is gonna respond. Object. So let's just test this out. I hate you, guy. So let's not try and troubleshoot what's going on. Let's check the peak interface. That's fine. Dylan doodles Boxer of Destroyed We've Got an Era compiled. Let's come back over there. Compile. So that's fine. So let's just try again. So there we have a stuff you errors, that we haven't got the basis off our games in the next section. Let's start outscore point and time. 5. Setting up the point and time system: how low it's market or she from Arkham three day. Please make sure you like and subscribe to the YouTube. General keeps you up to date with content. And with this playlists as well. In this section, we're gonna be working on the points score and the time. So let's start off by creating our point system. I'm going to groups having a bit of a hissy fit there. I'm going. Teoh, turn this off. So let's now add some texting eso text render and we will rotate that around 180. And I'm gonna move that up and hold coming. Let's hold wrote to duplicate and left click and drag that down So this one's gonna be out . Scoreboard, let's say let's go time. Actually, Sorry. I wanted top one to be time and the bottom one to be school. What I'm gonna do is I'm gonna select both of these. Let's get blueprint converts, selected components, the blueprint class underneath. Let's put this in the Blueprint folder and it'll be BP underscores Gore board. We'll see, baby be create blueprint. All right, so now I'm going to go back into I have lost all my tabs at the top, but I'm gonna open up the pickup interface. What I'm going do is a new function. I'm going to call this point and compile from here. I'm going to class sittings. And let's add in that pickup interface, let's go event from here, which we do. Let's work on the score first. Which ones? They're score the bottom ones that score. So let's call this text on the school school, and this would be text time. The tech score. Let's get this first. What I want to do is when we come back over into here when destroyer off boxes destroys an actor, I wanted to send a message to or what I call it point. Okay, send a message to point and a target will be a new variable. And we will call this, um, school board and once again will make this an actor. There we go and will make that open. Get here, save. Let's come back into our motion. Control of map. We've got our destroyer of boxes, blueprint selected and that scoreboard. Let's select our little eyedropper tool and score board there. So every time it destroys an actor, it's gonna send off a message to point and it's going to a target that so if we come back into school B and we right click, remember, compile. Everything looks fine compiled. If I go point, I hope strike in If I get a point, I want a function event point. Beautiful. So now what we need to do is let's make a, um, interject to count. So let's go Gore number. And this will be an into just because they're gonna be a full number. Let's go compile se. We're going to get the score number what it is ever gonna get plus symbol, and we're gonna go integer at integer and we're gonna adding one. And then from here, we're going to sit what the new scoreboard number is. All right, so you get like that. Compile, press play. And now nothing happens because we haven't really done anything. So from here, we're going to expand off this and we're going to go set text, and we should have the option to text score that we get that one value will be this texting Jack, blah, blah, blah, blah. Compile. Let's play in via one. To free for what? This awesome that was 10 squats. I feel amazing and my legs are already sore. Now let's set the time up. So I'm gonna call this school time. And how long was going? Compile and let's go. How many seconds? 100 20 Event tick. What we do first is selected, Oventic, and go a delay and the duration is 0.2 of a second. I want every one second bullets, guy. Pretty much what we did here. We will get what? Sorry. We will get the time. We will mine us interject minus in the job one second. And then let's connect these up. And from here we will sit text and we're gonna six text time. And here. Okay, Just for now, just quickly testing. I was gonna make this farm seconds and it's compile and play. Awesome. Brilliant. 6. Creating Game Over: how low it's monument or sheer for my crime. Three. D and this is the final part of our squad exercise via machine nous. So we're just gonna be tidying up some of this stuff and making kind of lucky game over section. And here we go. So we've got our time working, obviously, now goes into minor seconds. So what we'll do is make a I'm actually, let's leave it like that will come over here and we will go get time when it's greater than so I just talking equal. So when it's less than or equal to zero, let's make a branch. So when it's true, let's guy set text just like we did text time. When it's true, we will sit a text. No string to text that not good enough. Actually, what we can do is format text, and we will put in game over Fucking sport, right Game over. Compile play 4321 Game over. Let's go as a last hurrah. Stop responder. Let's do this so you can pack into our pick up into face. Add new function. Stop briefs, Boerner. So you kind of gets to one more point if you know what I mean. Um, compile that. Let's go. What are we gonna dio? So if we get back to our school board, if it's true, we're gonna messy age stop responder message. And who are we gonna message? We're going to message these boxes here. This blueprint here, which is called Random Spawn. Now, do we already have random sport running in here? We do not. So let's now create another random sport and we will change this from interject to a doctor . Bam! Let's bring that in here and press the I compile, Come back in the motion Controller, um, select our time score and we should have random Sponder is put in random spawn. Er, if we come back into our random Boerner, let's add in a little bit of smart in here. It's typing random Boerner turn off context sensitivity. No, it's not working. So that's because it's called stop stops Porter context, sensitivity. Turn that on that event. And what we'll do is let's create new variable and call this, um, game over sent, and we'll set this to true. And the more we can do is putting a branch get So now we have it was worn. Event. Is this true? Yes, you could change that. So false is the game of Ah, true. No call so false. Let's born another one bubble. Our countdown game over the time is end events. Boerner Um, once the clock runs down and score time is belong equal to or less than zero, it's going to send a message to random spawned at random. Sport is going to get the message said Game over to Set to True. And then this will now be true. Nothing happens. Sorry, that's pretty much game. However, let's now go to Let's just play. Let's go Scoreboard. Let's add in some extra time. Let's go 30 seconds and let's press play. - Look , I don't support anymore. I hate this game. Cheese of whiskers. And so there we haven't I didn't know what school was it. That is a very basic exercise game on squats