We now know how to create physics objects that allow us to do the dynamic movements and interesting interactions, but we haven't been able to interact with them yet. We actually want to pick up our ping pong ball and play ping pong. Now, in this video, we're going to look at that, but we're going to use a plugin that makes it easy to do that. So we're not going to work with the built-in thing. So we're going to use a plugin called NewtonVR, which makes it very easy to create sort of interactive behavior with physics objects. And it's free, and it's a great starting point. So I'm going to use that. Now, it's really good but one of the downsides, it can be a little tricky to set up in your own project, and I had trouble with that. So I think, I find it's best if you're using NewtonVR to start with a blank NewtonVR project and then import your other assets. So what I'm going to do is I want this ping pong table, the ping pong ball and the bat to import into a new project. And I'm going to show you a way of doing that. So I'm going to move all these down to the bottom, and I'm going to create a new game object, an empty one called PingPong, which I'll create in one place, there. And I'm going to add all of the bits to do with ping pong to it. I want the ball, the bat and the ping pong table. So they're all inside the main ping pong game object which isn't have not been called Ping Pong. It has renamed itself PingPong. So here we are.I'm going to also tidy up a few things about this, okay? If you look at the ping pong table, the center of the ping pong table is actually in a slightly weird place for this ping pong table. I was not very careful when I created it. So I'm going to set the other bits of the ping pong table to the base and the top to be at X and Z zero. Well, it's a ping pong table. The Y is fine so they should be at a move. Well, that's the ping pong table. So now that's set up nicely. I can just sort of move it that way I want it. And that's now a little bit high. Let's just go to close to the floor. Okay, so that's all set up quite nicely, and we've got everything inside this object ping pong table. Why have I done that? Well, because I'm going to show you a trick. Once we've got everything inside the same object, we can drag it from the hierarchy which are the things that are currently in this particular scene into the project, which has all the assets, the saved files that we've got. And if we do that, it actually creates what we call a prefab, which is a preexisting thing. It's an asset that I could drag it in if I wanted yet another ping pong table. I now have two ping pong tables. Isn't that cool? I don't want two ping pong tables, but I'm going to do something more important than that. I'm going to use this to save everything, to export it. So I'm going to right click on ping pong table and then do export package, and I'm going to export it into this file, NewtonVR test and I'm going to call it PingPong. I've actually done this before so it already exists there. I'm going to overwrite it. Okay, so now this is a file called the Unity package that we can then important into a new project. So let's open this new project. Okay, so now we've got a new project. Let's make it big. And currently, there's no scene here but I've already imported NewtonVR. So I've imported it from the asset store. While doing that, I've imported the Oculus OVR SDK. So I'll give some links to instructions on how to do that. That's part of setting up the NewtonVR. And what I'm going to do is now open the NewtonVR example scene. Here it is. Before I do anything, I need to select this thing at the top called NVR player. You need to click enable Oculus SDK. And if you don't have it installed, it'll say install and take you to the install page with instructions on how to create the Oculus SDK. I'll put some notes about that in the readings after this video. So let's have a quick look at this. I mean this is already quite fun. There's lots of stuff here. As I move around, I've got a controller here which you can see. And I can grab something and I can throw it and it falls on the floor. I have a physics-based interaction. I think that's really exciting I have really. So this is pretty cool. And go and play with these examples. It's great. But I won't to give you a full demo of it today. What I'm going to do is actually make use of this example scene but to save as and call it MyPingPong. And I'm going to get rid of all the stuff that isn't all of the objects. So I need to keep NVR player. I'm going to create collision sound controller. That's quite nice. It makes a noise whenever something falls on the ground. But I'm going to get rid of the apple tree, the flower gun. I'm going to delete those. I'm going to keep the directional light and the floor because I don't want it to fall to the floor. But I'm then going to just delete everything else. And we've got an empty scene. And we can see this green thing is me. Oh wait. I've go the control panel. So we've now got a properly empty scene, and we're going to now import the package that we created in our other projects. And we've got this ping pong Unity package. Import that, and we have our ping pong prefab. Let's go to ping pong table, one which I created earlier. And here it is. We can rotate it. Actually, I spent a lot of time getting the ping pong table set up. Now, I've got the pivot of the scene in the wrong place. Apologies. Let's position it. Make sure it's on the floor, what goes through the floor when you tap a little bit. And put it in front of me and a little bit across. So we have a ping pong table now in our scene. And we can run it and we can see what happens. This is kind of what I expect. The only difference you can see is that I now have my Oculus controllers that we can interact with. But I still can't really pick things up, but I can actually tap them. It's kind of nice. And hits the object, that's pretty good. But I want to pick this up. How am I going to pick it up? So what's lacking is the ability to pick up objects. So I want to be able to interact with my bat. Now, the controllers in the rigid bodies already interact. But I'm going to add a component which comes in NewtonVR called NVR interactable item. And that means I can interact with it. And actually, there's not really that much more I need to do. So if I then pick up the trigger, and this is my Oculus controller, I can interact and pick up this object over here. So I've got a ping pong bat that I can interact with. Now, I'm going to try this again, and this time, pick up the ball. And this is a little bit difficult. I'm going to put it now, pick up the ball, pick up the bat. Oh no, I can't pick up the ball, sorry mistake. I need to add NVR interactable item on that as well. So we have a bat and ball. I can pick up the ball. I can pick up the bat. Sorry. I can pick up the ball and I can play ping pong. Woohoo. And even when I drop the ball, it just falls on the table nicely. So in just a few minutes with NewtonVR library, we have created a ping pong game. Now, I won't subject you to me trying to the play ping pong in the virtual world. I'm pretty bad at it in real world. And this isn't really a ping pong game yet. It needs a lot of testing before you're sure it's playable and you can do it well. And should probably go and look up more details of the NewtonVR library to make sure you really understand it well and use it. But this is a great starting point, and it shows that with all the physics that Unity provides and the NewtonVR library, you could actually create some really pretty good virtual reality interaction that really starts to be something that's like a proper game. So I'm really excited about this. I hope you are too.