Pose vehicle
PoseVehicle
is pose (position and rotation) input based vehicle. This vehicle model is mainly used to control NPC vehicles. Controlling vehicles through pose input enables more versatile traffic simulation.
Info
Ego vehicle mainly uses acceleration-based input for vehicle dynamics. For details, here.
Prefab
Path : Assets\Awsim\Prefabs\Entity\Npc\Vehicle\*
Hatchback | SmallCar | Taxi | Truck | Van | |
---|---|---|---|---|---|
Appearance | ![]() |
![]() |
![]() |
![]() |
![]() |
Prefab | Hatchback.prefab |
SmallCar.prefab |
Taxi-64.prefab |
Truck_2t.prefab |
Van.prefab |
Physics engine effect
PoseVehicle
improves realism by allowing the physics engine to affect certain axes.
Axis | Note |
---|---|
Position x | input value. |
Position y | Physics engine. |
Position z | input value. |
Rotation x | input value. |
Rotation y | input value. |
Rotation z | Physics engine. |
How to use
- Attach the
PoseVehicle
script to the vehicle game object and set up each item. - Call
PoseVehicle.Initialize()
during initialization. - Enter a value in
PoseVehicle.PoseInput
before callingOnFixedUpdate()
. - Call
OnUpdate()
inUpdate()
andOnFixedUpdate()
inFixedUpdate()
.