Skip to end of metadata
Go to start of metadata

How do seat positions work from geometry to script?

Vehicles that cannot be driven are hardly of any use in games, so giving the player the possibility to drive our vehicle will make it much more valuable to him. The _simple_4_wheel.XML has its movement parameters set up already, so it's just a matter of adding a drivers seat for the player to hop into. We'll start by adding the seat itself in the <Seats> tab in our _simple_4_wheel.XML.\


  <Seat name="driver" part="body" enterHelper="" isPassengerHidden="0" sitHelper="" isDriver="1" AimPart="" seatGroupIndex="1" actionMap="vehicle_driver" remotelyUseActionsFromSeat="" id="idSeat1">
      <View class="FirstPerson" canRotate="1" hidePlayer="0" rotationMin="-10,0,-60" rotationMax="10,0,60" stickSensitivity="2,0,2" stickSensitivity2="1,0,2" relaxTimeMax="0.5" relaxEnabled="1">
        <FirstPerson followSpeed="30" fov="55"/>


Unless you want to have the player hover somewhere next to the vehicle, you will need to create a sitHelper for him to be positioned at. The easiest way to create a sitHelper for a seat is to create a dummy in your DCC tool and link it to the body part.



Once you created the sitHelper in your DCC tool, just add the dummys name in the "sitHelper" property and the player will be put into that position once he enters the vehicle.


<Seat name="driver" [..] sitHelper="driver_sitPos" [..]">


The <Views> brackets contain all the views that are available for each seat. For this example only a first person camera has been set up. Alternative views would have to be set up between the <Views> brackets as well.


  • No labels