top of page
Search

[Chaos Physics] Unreal Engine 5.2 駕駛Chaos車輛教學 |Driving Chaos Vehicle

  • Writer: Liling Liu
    Liling Liu
  • Oct 24, 2023
  • 3 min read

Driving Chaos Vehicle


ree

Import Mesh and Texture: Crab the model and texture into Browser



ree

ree

Car already rig and skin


FBX import Options:

Skeletal Mesh: turn on


Combine Meshes: If you have many separate mesh, you could turn on




















Plugins:


ChaosVehiclesPlugin



ree

WheeledVehiclePawn


ree

Create BP:


Right click mouse > Blueprint Class


All Classes:

search: vehicle

Select “ WheeledVehiclePawn ”



ree

Mesh > Skeletal Mesh Asset > car



ree

Camera


Left side > +Add > SpringArm and Camera


Setup camera target Arm Length: 600


Camera Settings:

Turn off:

Inherit Pitch

Inherit Yaw

Inherit Roll


Camera Collision:

Probe Size: 0

Do collsion test: Turn Off



ree

Wheel Setup


Select Vehicle Movement Component


This car has four wheels so Press 4 times to add


Wheel Setup > Wheel Setups > +


ree

Go to Skeleton and copy bone name


Select the bone > right click > Copy selected Bone Names


ree

Paste to Wheel setups index bone name


ree

Engine Torque Setup


Vehicle Movement component > Mechanical Setup

ree

Two options can create Torque curve


ree

Option1: Double click to show the Torgue curve window


ree

The graph's X axis represents the engine RPM (revolutions per minute)

The graph's Y axis represents the engine Torque output in NM (Newton Meters)



Total Tougue : 300


Add curve points in 300


Shift + left click mouse : Add points


Curve like image



ree

Option 2:

ree

Right Click mouse > Miscellaneous > Curve












ree


Pick Curve Class: CurveFloat






Add Keys


ree

Go to BP_Car


Vehicle Movement component > Mechanical Setup


External Curve > select curve



ree

Chaos Vehicle wheel Blueprint


In most cases, you will require at least two wheel types per vehicle.

A wheel that is affected by the steering / engine / handbrake, and one that is not.

This may be the case for having differently sized wheels for the front or the back


Create wheel BP:

Blueprint Class > ChaosVehicleWheel



ree

Create front and rear wheel BP


ree


Double click BP_Front_Wheel


Setup

Wheel > Axle Type : Front

Affected by Handbrake: Turn Off

Affected by Engine: Turn on

Wheels setup

Max steer Angle:45

Affected by steering: Turn on


ree

Double click BP_Rear_Wheel


Setup

Wheel > Axle Type : Front

Affected by Handbrake: Turn on

Affected by Engine: Turn on



ree

Go back to BP_Car


Update wheel setups class


ree

Turn on Simulate Physics


ree

Game Mode


ree

Default Pawn Class: BP_Car


ree

World Settings


Window > World Settings



ree

Game mode

GameMode Override: GM_Car


ree

Play Game result


ree

Car Physic


ree

Select physic and delete


Because the default physic shape is not fit for the car


ree

Select wheel bones > Primitive shape: Sphere >Add bodies


ree

Select Root bone > Primitive shape: Single convex Hull >Add bodies


ree

Control camera rotate


Open BP_Car


ree

Using mouse to rotate camera


Mouse X Axis Value ---> Delta Rotation Z

Mouse Y Axis Value ---> Delta Rotate Y



ree

Play Game Result:

Discover the car is not on the ground.



ree

Go to BP_FrontWheel and BP_RearWheel change “ wheel radius ”


Wheel Radius: 20



ree

Result:


ree

Vehicle Movement


ree

Input Action


Project settings


ree

Go to Engine - Input


ree

Action Mappings: HandBrake --> Spacebar


Axis Mappings:

Thottle --> W

Brake --> S

Steering --> A , D


ree

Go to BP_Car


Each InputAsix to connect


Vehicle Movement


ree

Animaton


Obtain the behaviors we want for our vehicle.


Select car skeleton > right click mouse > Create > Anim Blueprint

ree

Opne AnimBP > Class Settings > class options > Parent Class : Vehicle Animation Instance


ree

Mesh Space Ref Pose: this is used to return the mesh space reference pose for our skeletal mesh in the Animation Blueprint


Wheel Controller : offloading a lot of the work in creating these types of animations, you can use the Wheel Controller Node to drive the animations.

ree

GO to BP_Car


Select Mesh > Animation > Anim Class : AB_Car


ree

Play game


Result


ree




Youtube Tutorial:








教學專案和文件下載 / Full Project and Document Download:





Sketchfab - Car Scene:



How to Set up Vehicles Unreal Engine 5.0




贊助 / Support Me




 
 
 

Comments


CONTACT

Liling Liu

Email: liling5731@gmail.com

© 2016 - 2025 by LilingLiu. All rights preserved.

bottom of page