Customizing the Auto Safety Distance between vehicles at the spawn point
The Spawn Point feature is vital to generating realistic traffic flow in MORAI SIM: Drive, but due to the basic concept of making an entire vehicle appear out of thin air, issues such as unintended collisions may occur - especially if there is another object occupying the spawn point.
To make up for this potential issue, users can make use of the Auto Safety Distance option to prevent vehicles from spawning when they shouldn’t.

Auto Safety Distance
Using the Auto Safety Distance feature
When a spawn point object is selected in Scenario Edit Mode, Auto Safety Distance can be activated or deactivated by using the toggle button on the panel.
When Auto Safety Distance is on, which it is by default, the safety distance at which vehicles will not spawn is determined automatically. Since vehicles at spawn points can be generated at very high initial speeds, the safety distance can be a much wider range than the user may expect.
When the Auto Safety Distance toggle is deactivated, users can select two parameters they can manipulate:
Safety Distance (m): users define a set distance. If a vehicle is detected within the set distance, the spawn vehicle will not be generated.
Time To Collision (s): operates similarly to setting a safety distance, but determines if a collision will occur using the time to collision (TTC) instead of a simple distance value.
![]() Activated (Default) | ![]() Deactivated - | ![]() Deactivated - |
When the Auto Safety Distance toggle button is turned off a warning message will pop up as shown in the figure below.

Safety Distance specifics
Terminology
The following terms below are used by MORAI SIM: Drive to define different distances. A diagram describing each of these values is provided below.
User Custom Safety Distance
The distance from either the spawn vehicle’s front or rear bumper by the safety distance value or TTC value specified by the user in the Auto Safety Distance panel.
Leading Vehicle Distance
The distance from the spawned vehicle’s front bumper to the nearest leading vehicle's rear bumper.
DLV = Db/n spawn vehicle and leading vehicle - (Dspawn vehicle front distance+ Dleading vehicle rear distance)
Where,Db/n spawn vehicle and leading vehicle: distance between the leading and spawn vehicle
Dspawn vehicle front distance: distance from the spawn vehicle’s rear shaft to its front bumper
Dleading vehicle rear distance: distance from the leading vehicle’s rear shaft to its rear bumper
Following Vehicle Distance
The distance value from the spawned vehicle’s rear bumper to the nearest following vehicle’s front bumper.
DFV = Db/n spawn vehicle and following vehicle - Dspawn vehicle rear distance + Dfollowing vehicle front distance
Where,Db/n spawn vehicle and following vehicle: distance between the spawn and following vehicle
Dspawn vehicle rear distance: distance from the spawn vehicle’s rear shaft to its rear bumper
Dfollowing vehicle front distance: distance from the following vehicle’s rear shaft to its front bumper
Minimum Safety Distance Range
The minimum distance within which the vehicle can safely spawn at the spawn point. Depending on the direction, the minimum distance can be measured as follows:
Dmin = Dspawn vehicle front distance + Dspawn vehicle rear distance
Where,Dspawn vehicle front distance: distance from the spawn vehicle’s rear shaft to its front bumper
Dspawn vehicle rear distance: distance from the spawn vehicle’s rear shaft to its rear bumper

Spawn Conditions
These are required conditions to create a vehicle from a spawn point safely. Both conditions must be satisfied simultaneously.
There should be no vehicles within the Minimum Safety Distance Range.
Both the Forward Spawn Condition and Backward (Rear) Spawn Condition must be satisfied. The specifics of these conditions will vary depending on which of the following modes are selected.
Auto Safety Distance Mode
Safety Distance Custom Mode - Safety Distance Mode
Safety Distance Custom Mode - TTC Mode
Auto Safety Distance mode
The simulator automatically determines the safety distance when Auto Safety Distance mode is enabled using the following rulesets.
Forward Spawn Condition
There shall be no vehicles within the region determined by the Forward Safety Distance.
Dforward safety = Dbraking + Dreaction + Dsafety margin
Where,Dforward safety: Forward Safety Distance
Dbraking: spawn vehicle braking distance given its current velocity
Dreaction: reaction distance
Dsafety margin: safety margin distance
Backward (Rear) Spawn Condition
There shall be no vehicles to the rear of the spawn point within the region determined by the Rear Safety Distance.
Drear safety = Dbraking + Dreaction + Dsafety margin
Where,Drear safety: Rear Safety Distance
Dbraking: following vehicle braking distance given its current velocity
Dreaction: reaction distance
Dsafety margin: safety margin distance
Safety Distance mode
When the user manually disables Auto Safety Distance mode and sets a safety distance value, the spawn conditions are determined by the User Custom Safety Distance and its relation to the distance between the spawn vehicle, leading vehicle, and following vehicle.
Forward Spawn Condition
User Custom Safety Distance < Leading Vehicle Distance
Backward (Rear) Spawn Condition
User Custom Safety Distance < Following Vehicle Distance
There is a maximum ceiling for the safety distance parameter, which is calculated as: (The link velocity of the current spawn point * 20)
TTC mode
When the user sets a TTC value instead, the spawn conditions are determined by the calculated User Custom Safety Distance according to the TTC.
Forward Spawn Condition
The Forward Safety Distance calculated using vehicle velocity and TTC must be less than the Leading Vehicle Distance.
Dforward safety = (Vspawn vehicle - Vleading vehicle) * TTC
Where,Vspawn vehicle: velocity of the spawn vehicle
Vleading vehicle: velocity of the leading vehicle
TTC: time to collision (in seconds)
Backward (Rear) Spawn Condition
The Rear Safety Distance calculated using vehicle velocity and TTC must be less than the Following Vehicle Distance.
Drear safety = (Vfollowing vehicle - Vspawn vehicle) * TTC
Where,Vspawn vehicle: velocity of the spawn vehicle
Vfollowing vehicle: velocity of the following vehicle
TTC: time to collision (in seconds)
If the velocities are such that a collision will occur upon vehicle spawn, the User Custom Safety Distance is set to 0 to prevent the spawn vehicle from appearing.
The maximum TTC value the user can set is 20s
.