From the course: ARKit and Unity: Build a Drivable Car in Augmented Reality
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Rear-wheel drive script, part 2 - Unity 3D Tutorial
From the course: ARKit and Unity: Build a Drivable Car in Augmented Reality
Rear-wheel drive script, part 2
- [Instructor] As you saw in the previous video that the car is moving perfectly, it's rotating as well but the front wheels of the car are not rotating and are not moving left and right as it should. So let me show you what exactly is happening. If I hide this front left wheel and select the wheel collider then if I drag the car you can see the wheel collider is changing its position that is it is moving forwards and backwards and also it's changing its rotation to left and right. So we are going to fix that in this video. So to fix our problem we have to do two things. First we have to keep the position of the wheel model same as the position of the wheel collider at all times. So let me show you what I mean. When the car moves the position of the wheel collider changes. So along with changing position of the wheel collider, the 3D wheel model should also change its position like this. And the second thing is rotation. So when we press the left and right arrow keys, the wheel…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
How are we going to do it?56s
-
(Locked)
Wheel colliders, part 16m 8s
-
(Locked)
Wheel colliders, part 22m 30s
-
Adding the car model5m 35s
-
(Locked)
Rear-wheel drive script, part 19m 57s
-
(Locked)
Rear-wheel drive script, part 27m 2s
-
(Locked)
Adding touch controls10m 44s
-
(Locked)
Resolving some bugs and running the app9m 24s
-
(Locked)
-