How to Slice Objects in your Oculus Quest/VR App using Unity

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi in this video we'll go through the process of making object slicer in vr this was achieved by using the easy slice framework made by david orion more on that later in the video in all fairness the implementation for vr i will show you could be better there are some unexplainable things happening sometimes so it's not completely reliable there are some workarounds for this one option could be to use velocity to force a player to act fast so issues with colliders are not visible for example for a game like beat saber another workaround would be to work with a plane that you control by activating a trigger i will make a video tutorial on this in the future as well as a series on how to make beat saber yourself let's begin first of all before starting make sure you have the xr interaction toolkit installed and have your vr headsets set up i will be using my oculus quest if you want to set up your quest for unity feel free to watch my tutorial on how to set it up the link is in the description this video is not a video for complete beginners but even if you are new you should be able to follow along start a new project in unity with the xr interaction toolkit enabled as mentioned before we need the easy slice framework to make it all work you can download the framework for free and add it to your unity project go to github.com slash david orion slash easy slice to download the project thank you david download unpack and add the easy slice folder to your assets make a new folder called scripts because i know most of you guys just want to start slicing as fast as possible i uploaded two scripts to my github page so you can just download them and put them in the scripts folder go to github.com land vr slash slice meshes download them unpack them and add them to the scripts folder as usual delete the main camera add a plane so we have a floor make sure the plane positions are set to zero add a room scale xlr rig create an empty object under the right controller and name it sort collection under the sort collection add a cylinder set the scale to 0.03 0.6 and 0.05 set the y position to 0.6 change the name to sort enable s trigger the second thing to add here is a plane this will be the invisible slicer plane set the scale to 0.07 1 and 0.12 set the rotation to 90 0 and 90. set the y position to 0.6 and the z position to 0.3 name it slicer because this plane should not be visible disable the mesh renderer to make the sword easier to handle with the controller select the sword collection and rotate it 45 degrees on the x-axis out of the controller add a cylinder this will be the cylinder that will be sliced you can pick whatever convex shape you like a convex object never has holes when you draw a straight line from one side to the other side so it can be triangle cube cylinder sphere or capsule a bowl or ring for example are not convex shapes set the scale of the cylinder to 0.5 1 0.5 set the y position to 1. move it a bit away from the xlr rig and move it a bit aside so it doesn't touch the sword when the app starts we need to set a custom layer mask for sliceable objects so let's make one and add it to the cylinder go to layer add layer and name it sliceable add a rigid body we still need to link the two slice scripts drag the slice listener to the sort and the slicer script to the slicer plane select the sort and drag the slicer onto the slicer in the slice listener select the slicer plane and set the slice mask to sliceable before starting go to the left and right hand controller and remove the xor interactor line visual line renderer and xray interactor and that's it you can now build and run the app and slice the cylinder if you want to slice the newly created parts again you will have to add a sliceable layer mask in the script to the make it physical method in future video i will go further into customizing the slicer script and i will go through the slicer script step by step if you want a breakdown of the script right now you can download it from my patreon page figuring out a way to slice objects in unity with the vr controller was a challenge that took a lot of time and effort but i'm happy i did it and that i can share this video with you if you want to download the complete project you can do so from my patreon page the project is set up for the oculus quest but you can easily add or enable other vr headsets thank you for watching
Info
Channel: LandVR
Views: 13,458
Rating: undefined out of 5
Keywords:
Id: iRW2CyQysdw
Channel Id: undefined
Length: 6min 13sec (373 seconds)
Published: Wed May 13 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.