
Hey, thank you so much for betting this course! It’s my third here on Udemy and it’s being great to make this projects and share it with you. Hope you have fun building your virtual reality race track, and don’t forget to share your projects with the rest of the group I’ll be here to help you out if you need to.
You will learn:
Set a car in Unity 3D with sound and real physics
Set different cameras and allow the player to switch between them
Import an awesome race track with palms and a lake
Set a countdown timer to track your fastest laps
Improve the project’s performance via Profiler Tab and FPS output
Make your Unity project work on a Virtual Reality Headset
Use a VR controller to control your race car
Create a GIT and upload your project
Compile your project on the Unity Cloud platform
Download and run the project on your smartphone
Practice a little for when you are on a real live race car
What we are going to do
We are going to create a Unity project and start by setting our car controller, to start we want to make it work on a desktop version. After that we will import the race track and set a countdown timer is also important so we keep track of our driving skills. When we are happy with our scene and car controller we will adapt our project to a virtual reality headset, I am using a VR PARK-3 and it’s controller it’s best if you have one like mine however if you get into troubles post about it so can figure out the correct configuration for you. Unity has a service called Unity Cloud and it can be really useful to compile our projects, we are going to set our project and use this awesome feature to compile this project, you can certainly use this in your future Unity projects.
What you need to know and have
This is one of my courses that has less code, however to complete this it’s important that you have a smartphone and a virtual reality headset to try the project unless you just want to use it on your screen or export it to a smartphone later on.
I am using an Android cell phone, however the project should run fine in other devices such as Iphones because Unity allows to export our projects to many other formats.
Start Unity and create a new project, mine is already created and opened so we don’t have to wait for it to load, let’s start with the terrain GameObject -> 3d Object -> Terrain, we want it to be big so select it click on the gear and will set it to 5000 5000, notice that this unity is metrics this is duo the fact that the company that develops Unity originally started in Denmark however their headquarters are now at San Francisco, US.
Import the environment package so we can have some ground textures among other objects, we will go to the brush icon and Edit Texture and set the grass hill albedo texture,
Also add some random objects to your scenario, this way when the car moves you can have a better perception of where and how it’s going, painting the terrain is also a good idea.
Get your car working!
Our imported car model isn’t the best to place the camera inside, as you can see when we do this … there’s nothing special to see inside so let’s import some free models with better interiors.
We will write script that loads the cameras inside an array and when we press TAB it will change between cameras.
Let’s write a simple script that will detect when the user passes by the start box, start the counter and stop the counter when the car hits with the finish object.
Let’s analyze our project regarding performance, since this will be a virtual reality project we want it to have a smooth user experience.
There are no secret formulas to convert a heavy Unity project that uses lot of CPU and GPU into a light and high Frames Per Second project. The best way is good written code, improved 3D models with few vertices and use only the visual effects that you strictly need.
Unity as some tools that can help us improve the project performance overall.
We want to make sure our project doesn’t have any error that we can fix right away and the project version is prepared for Android platform.
As mentioned I am using the VR park 3D headset and gamepad, you can get it at:
http://www.gearbest.com/virtual-reality/pp_364125.html?vip=1302584
(yes the link has a referral to me ;) )
To get our project working we need to change the car controller script.
You will receive an e-mail when the compilation is done, or you can always leave this page open and wait for it to finish, the more consecutive compilations you make the bigger the waiting time will be, also Unity Cloud will detect when a new GIT commit is made and will start compiling the new files automatically.
Once the compilation is done (if successful) download the APK and email it to an account that you have on your smartphone, you can also login to Unity Cloud on your mobile and download it directly however I find it it be slower.
Once you got the APK on your cell phone ( you need to enable untrusted sources ) install it and see how your awesome work goes on your cellphone.
Unity cloud is good if you are building big projects or your computer doesn’t have much hardware power, however you can always go to Files > Build Settings > Build and Run to build the project and deploy directly to your cell phone.
If you arrived here you must have your car racing inside your virtual reality headset!
Your review is really important to help me make better courses, because Udemy is not just about making money but also to improve our knowledge as instructors by practicing and learning from you, if you had any problem during the lessons drop me a line and I’ll be glad to help out. Thanks and xau!
Want to learn more about VR ? Grab this awesome discount: https://www.udemy.com/your-vr-experiences/?couponCode=VRPROMO
Hello, my name is João Dessain Saraiva and besides working as a web developer one of my favourite hobbies is virtual reality. To stay updated with this technology I like to create content for Udemy and I am also a virtual reality technical advisor for a british VR company.
So I always wanted to drive a race car on a professional race track, and since I didn't have the chance to do it yet I decided to make a virtual reality project about it.We are going to build a race track in Unity 3D and import a car model, set 3 different player view perspectives and a countdown timer tracker to keep track of our driving skills.The project will be built on Unity Cloud and we will also apply some techniques to improve the overall performance, and yes for sure it will have virtual reality and gamepad support.
The lessons contents is fully described, and if you have any question don’t hesitate in posting it I’ll be here to help you out, let’s go!
You will learn how to:
Use Unity 3D to create a basic scene
Car racing scenario
Configure camera and perspectives of view
Switch between cameras
Import scenes and assets
Set and code a countdown timer
Techniques and methods to improve performance
Prepare and deploy your project on a Virtual Reality headset
Gamepad configuration
Use Unity Cloud to build your Unity 3D projects, save resources and time
You will always feedback and custom response to your questions
Get to know more about our courses at hackademy tk