Setting up multiple cameras for the car
In this recipe, we will demonstrate how you can set up different cameras at different positions to be utilized within the game. We will demonstrate some of the basic views such as First Person and Third Person as well as the popular Wheel rim camera usually used in action replays in various other media.
Getting ready
Complete the Creating a new car XML recipe. Then open MyVehicle.xml
in Notepad or an equivalent editor.
How to do it...
First Person Camera:
After the Creating a new car XML recipe, we should already have the majority of what we need in the
<Seats>
cells. For our first camera, we will utilize the<View class="FirstPerson">
cell to make a new first person camera that we can also look around with.First, we will need a new Helper. Copy the following into the
<Helpers>
cells:<Helper name="driver_view" position="-0.75,0.35,2.0" direction="0,1,0" part="body"/>
Now, define this
driver_view
helper in the emptyFirstPerson.helper...