City Car Driving Guide

[For modders] Passenger Placement in the Car for City Car Driving

[For modders] Passenger Placement in the Car

Overview

Passenger Placement in the Car

1. Introduction

Up to two passengers can be currently added to the car. To do this, add a [Passangers] section in the file CarProperty.ini in datagamedatacars<my_car_name>… the new section shall have the following lines: (Shift =X.X; X.X; X.X, AngleX=X.X, AngleZ=X.X, SeatType = “X“).

For instance:
[Passangers]
seat_1 = (Shift =0.45; -0.023; 0.645, AngleX=0.0, AngleZ=0.0, SeatType = “MuchSpace”)
seat_2 = (Shift = -0.45; -0.023; 0.645, AngleX=0.0, AngleZ=0.0, SeatType = “MuchSpace”)

The lines contain the information on the placement of passengers, the X and Z rotation angles, and the animation type to be used for this car. All data in the seat_1 = (… line refer to the first passenger, and the data in the seat_2 = (… line refer to the second passenger. In all examples below, the Unit Setup settings of 3DS Max scenes are as follows:

2. Passenger Coordinates

Passengers have a so-called «center», the pivot (supporting points). Its location is shown in the picture below; it is shifted by about 0.115 m on axis Z relative to the bottom point of contact with the seat.

In order to correctly place a passenger in the car, it is necessary to know the coordinates of the passenger’s pivot relative to zero and the placement of the car itself in the 3ds max scene. The passenger coordinates are recorded as -X Z Y. The values are set relative to the center of coordinates, not to the car’s pivot. The picture below shows an example of passenger placement and illustrates the passenger’s shifts, and the correspondence of the order of the coordinate format in 3DS Max and the values in CarProperty.ini.

3. Passenger Turning Angles

It is often required to turn a passenger: to incline them forward or backward, or to rotate them around the vertical axis. To do this, it is necessary to change the values of AngleX=X.X, AngleZ=X.X, where AngleX indicates the turning angle of the passenger model in degrees around axis X, and AngleZ around axis Z, respectively. The rotation is relative to the passenger’s pivot. The pictures below show the turn angles and directions for the respective axes.

4. Animation Type

This parameter is determined by SeatType = “X“.

Passengers have two animation types:

  1. Enough space for the back passenger: the MuchSpace animation is used and recorded in CarProperty.ini as SeatType = “MuchSpace”.
  2. Little space for the back passenger: the second animation, LittleSpace, is used and recorded as SeatType = “LittleSpace”.

    The pictures below show passenger positions with enough and little space.

5. Work Acceleration

A pattern may be used to facilitate the calculation of passenger coordinates. Create a square Plane 1.1 m wide and 1.1 m high in 3DS Max -> apply one of the following images on it -> align the plane pivot with the pivot indicated in the image -> then adapt the position of the pattern to the required car by moving it along and rotating it around the two above axes.

The result is about as follows:

This provides the position and turning angle data to be recorded in CarProperty.ini.

SteamSolo.com