Skip to main content

Common Physics Properties

ObjectDescription
LModelComponentModel component. Used to add a model to a game object. Everything from small items to large buildings can be added to the scene with the model component.
LBoxComponentBox component. Used to add a box collider to the game object.
LSphereComponentSphere component. Used to add a sphere collider to the game object.
LCapsuleComponentCapsule component. Used to add a capsule collider to the game object.
LSkeletalMeshComponentSkeletal mesh component. Used to add a skeletal mesh model to a game object. Various characters and monsters can be added to the scene with the skeletal mesh component.

The contents of Physics properties of each component may differ slightly, but the contents of Collision properties are basically the same.

Component Properties

Transform

物理属性面板

PropertyDescription
MobilityThis property determines whether the component is movable and whether the physics object created by the component is static or dynamic.
  • Movable: The component creates a dynamic physics object.
  • Static: The component creates a static physics object.

Physics

物理属性面板

PropertyDescription
Override Physics FileWhether to use custom physics resources.
If Override Physics File = false, then the component will automatically find and load a physics resource file that matches the current model.
If Override Physics File = true, then the component will load only the user-specified physics resource file.
If the user-specified file is empty or does not exist at this time, the component will try to create a default collision.
Rigid FileThe user-specified physics resource file path.
The name of this property changes according to the classification of the component type. E.g.
The corresponding property name of the LModelComponent is Rigid File.
The corresponding property name of the LSkeletalMeshComponent is Ragdoll File.
The corresponding property name of the LDestructibleComponent is Destructible File
Note: For LModelComponent, if the resource file set by the Rigid File property is empty or invalid, then the component will try to create the default collision.
Components involved in physics simulation will create Convex collisions by default, others will create Mesh collisions by default.
Note: Please try to create collision resources for model components by the Rigid Body Editor, as the default collision for components is generated in real time from the model vertex while the Editor is running.
Meanwhile, try to use simple collision shapes (e.g. sphere/capsule/box) instead of Convex collisions or Mesh collisions (if possible) as simple collision shapes are more efficient.
Simulate PhysicsWhether the component participates in physics simulation.
When Simulate Physics = true, the component will automatically start the physics simulation after the game is started.
When Mobility is set to Static, the Simulate Physics property will be set to false automatically.
When Simulate Physics property is set to true, Mobility is automatically set to Movable.
Start AwakeWhether to wake up the component after the game is started.
When the component is involved in the physics simulation, but you want the component to be static initially and the simulation is not activated until the component collides with other object.
In this case, set the Start Awake property to false to get the above effect.
Auto WeldWhether to auto-weld to the parent component.
If Auto Weld = true, the current component will automatically weld to its parent component and combine with the collision of the parent component to become a whole.
MassQuality related property settings
MaterialPhysics material related property settings
GravityGravity related property settings

Mass

物理属性面板

PropertyDescription
Mass OverrideWhether to override the mass of the current component.
When Mass Override = true, the mass of the component is the value of Mass In Kg property.
When Mass Override = false, the mass of the component is the mass set in the physics resource file specified by the Rigid File property.
If Rigid File is not specified or the corresponding physics resource file does not exist at this time, the mass of the component will be 1 by default.
Mass In KgThe specified mass value(Kg).

Material

image-20230411102222161

PropertyDescription
Material OverrideThe physics material file.
The properties in the material file specified by Material Override are set to each collider contained in the component by default.
Apply Material To CollidersSpecifying a material file to a specific collider of a component will override the properties in the material file specified by Material Override.
When a model has different materials, a specific material can be set in Apply Material To Colliders.

Gravity

物理属性面板

PropertyDescription
Enable GravityWhether to enable gravity.
This property will take effect when the component successfully loads physics and when Simulate Physics = true.
Gravity TypeDifferent gravity effects can be obtained by selecting different gravity types, which can be extended by the program.
The built-in gravity types are as follows:
  • Default: Default gravity. The gravity along the -Y axis of the world space coordinate system, and the default gravity acceleration is 9.8 by default.
  • LVectorGravity: Vector gravity. The gravity whose direction and acceleration can be specified.
  • LSphereGravity: Sphere gravity. The gravity whose direction always points to the center of the sphere automatically.
  • LVoxelCubeGravity: Voxel cube gravity. The gravity on the 6 surfaces of the cube in the opposite directions to the surface normals.
Vector Gravity

image-20230411113847962

PropertyDescription
Terrain ComponentAny model component or terrain component in the scene.
Gravity Axis Of TerrainBased on the component specified by Terrain Component, select any axis direction of the component as the gravity direction.
Gravity AccelerationGravity Acceleration.
Sphere Gravity

image-20230411114053996

PropertyDescription
Terrain ComponentAny model component or terrain component in the scene.
The position of the component is the center of the sphere.
Gravity AccelerationGravity Acceleration.
Voxel Cube Gravity

image-20230411114531425

PropertyDescription
Voxel Terrain ComponentAny voxel terrain component in the scene.
Gravity AccelerationGravity Acceleration.

Advanced

image-20230411114804344

PropertyDescription
Start Active DynamicWhether to activate the component's physics simulation after the game is started
This property will take effect when Simulate Physics = true.
When Start Active Dynamic = false, the component will not automatically start physics simulation after the game is started, but will be created in the state of a kinematic Rigid Body.
The kinematic Rigid Body needs to be set externally to change its position.
Max Angular VelocityLimit the maximum rotation angular velocity of the component when involved in the physics simulation.
Linear DampingAffect the linear velocity attenuation rate of the component when involved in the physics simulation.
Angular DampingAffect the angular velocity attenuation rate of the component when involved in the physics simulation.
Sleep ThresholdSet the minimum energy threshold for a component to enter Sleep state when involved in the physics simulation.
Components in Sleep state will not be involved in the simulation until they collide with other objects or are forced to wake up, then they will exit Sleep state and get involved in the physics simulation again.
Wake CounterDetermine the minimum time for a component Rigid Body to enter Sleep state. The object will not enter sleep count until its kinetic energy is below Sleep Threshold. The object enters Sleep state after the sleep count ends.
Stable ThresholdWhen the mass-normalized kinetic energy of the component Rigid Body is below this threshold, the object will tend to be stable. The stability here refers to that of the interaction among a large number of objects in the scene.
Position Solver IterationPosition iterations
This property can be used to improve the quality of the constraint simulation.
E.g. When a component is connected to a constraint component and instability such as jitter occurs during the simulation, the value of this property can be increased to make the simulation stable.
Note: The larger the value of this property, the larger the performance consumption.
Velocity Solver IterationVelocity iterations
This property can be used to improve the accuracy of collision points in the physics simulation.
When two objects colliding with each other are badly stuck, try increasing the value of this property to make the collision position of the two objects more accurate.
Note: The larger the value of this property, the larger the performance consumption.
Center Of Mass OffsetUsed to offset the center of mass of a component Rigid Body from its original position.
Inertia Tensor ScaleUsed to scale the inertia tensor coefficient of the component Rigid Body based on its original inertia tensor.
Dominance GroupEach component can be assigned to a Dominance Group with indexes from 1 to 10. And the higher the index, the higher the dominance level.
The dominant component has infinite mass relative to the dominated component.
E.g. If Object A Dominance Group = 1 and Object B Dominance Group = 2, then in the physics simulation, Object A is unable to collide with Object B.
When Dominance Group = None, the component does not belong to any dominance group and has no dominance relationship with any dominance group with indexes from 1 to 10.
This property is often used to solve the case in which some dynamic objects are easily bounced off after collided and squeezed by kinematic objects.

Collision

Collision is the most commonly used physics property. And this set of properties are applied to both physics simulation and scene collision detection.

image-20230411135350291

PropertyDescription
Collision PresetsSelect a collision preset. A collision preset usually contains a Collision Channel type and a set of Collision Response parameters.
Collision presets can be added/removed/edited etc. in the Collision Preset Editor.
Collision Presets provided by the Engine:
  • Default: Default collision preset.
    If the property settings of the component's Rigid File are valid, the component will use the collision configuration in the physics resource file specified by the Rigid File.
    If the Rigid File properties are invalid, the default collision parameters used when the current component object was built will be used.
  • Custom: Custom collision preset.
    When the Collision Enabled, Channel Name or Collision Responses property is modified actively, the component's collision preset will be switched to Custom automatically.
  • NoCollision: No collision with any Game Object.
  • BlockAll: Normally used for static objects that block all Game Objects.
    When Collision Channel = WorldStatic by default, the collision responses to all channels are Block.
  • BlockAllDynamic: Normally used for dynamic objects that collide with all Game Objects in the scene.
    When Collision Channel = WorldDynamic by default, the collision responses to all channels are Block.
  • OverlapAll: Normally used for static objects that overlap with all Game Objects in the scene.
    When Collision Channel = WorldStatic by default, the collision responses to all channels are Overlap.
  • OverlapAllDynamic: Normally used for dynamic objects that overlap with all Game Objects in the scene.
    When Collision Channel = WorldDynamic by default, the collision responses to all channels are Overlap.
  • Pawn: Normally used for characters operated by the player or AI.
    When Collision Channel = Pawn by default, the collision responses to all channels are Block.
  • Destructible: Normally used for destructible objects.
    When Collision Channel = Destructible by default, the collision responses to all channels are Block.
  • VehicleWheel: Normally used for vehicle wheels.
    When Collision Channel = Vehicle by default, the collision responses to all channels are Ignore.
  • Trigger: Normally used for physics triggers.
    When Collision Channel = Trigger by default, the collision responses to all channels are Overlap.
    That means when a static object come into the trigger range, no event will be triggered by default.
Collision EnabledDetermine whether the component's collider will be involved in the physics simulation or scene collision query.
Collision Types:
  • No Collision: The component's collider will not be involved in any collision detection. In this case the component will not create physics.
  • Query Only: The component's collider will be involved only in collision detection in the scene collision query.
  • Physics Only: The component's collider will be involved only in collision detection in the physics simulation.
  • Query And Physics: The component's collider will be involved in collision detection in both the scene collision query and the physics simulation.
Channel NameDetermine the collision channel type of the component itself. Index the type of collision result in the Collision Responses property of the collided object.
Add and edit the needed channel type in the Collision Preset Editor.
The channel types defined by the Engine are as follows:
  • WorldStatic: Static objects whose position in the scene will not change should use this channel.
  • WorldDynamic: Dynamic objects whose position in the scene may change should use this channel. E.g. Objects whose position is changed (kinematically) by the physics simulation or by code control.
  • Pawn: Objects representing characters, whose positions are controlled by the player or AI should use this channel. Ragdoll colliders affected by animations also use this channel by default.
  • Vehicle: The vehicle type objects use this channel by default.
  • Destructible: The destructible type objects use this channel by default.
  • Visibility: Visibility collision detection channel.
  • Camera: Collision detection channel for the camera and other objects.
  • Trigger: Trigger dedicated channel.
Note: There are 32 channel types, of which 14 are used by the Engine and 18 are customizable for users.
Collision ResponsesThe Responses represent a collision result. Generally it is used in combination with the Channel type to determine whether a certain object will generate collision for a certain Channel type.
Optional Collision Response values:
  • Block: Objects will collide with objects of the corresponding Channel type.
  • Overlap: Objects will not collide with objects of the corresponding Channel type, but will generate penetration events.
  • Ignore: Objects will ignore collisions with objects of the corresponding Channel type.

Collision Determination Method

物理属性面板

The above demonstrates the collision determination process of a flying bullet hitting the rock behind the player after penetrating the player and colliding with the camera.

  • Step 1. The camera/player/rock component uses its own Channel property to compare with the corresponding Channel type in the Responses property of the bullet and get the collision response type.
  • Step 2. The bullet component uses its own Channel property to compare with the corresponding Channel type in the Responses property of the camera/player/stone component respectively and get the collision type.
  • Step 3. The two collision response types are combined to get the final collision result.
Step 1BulletStep 2BulletStep 3
A huge rockBlock+Block=Block
PlayerOverlap+Block=Overlap
CameraIgnore+Block=Ignore
Summary
Block + Any = Any
Ignore + Any = Ignore
Overlap + Block/Overlap = Overlap

Event Callback

物理属性面板

PropertyDescription
Notify Contact EventPhysics simulates collision event callback.
  • Default: Whether to respond to the collision callback is set in the physics resource file.
  • Yes: A collision event callback will be generated when the collision result of the component with other objects is Block in the simulation.
  • No: No collision event callback will be generated.
Notify Overlap EventPhysics simulates penetration event callback.
  • Default: Whether to respond to the penetration callback is set in the physics resource file.
  • Yes: A penetration event callback will be generated if both query results of the component and other object are Overlap in the simulation.
  • No: No penetration event callback will be generated
Notify Sleep EventPhysics simulates sleep event callback.
  • Default: Whether to respond to the collision callback is set in the physics resource file.
  • Yes: A sleep event callback will be generated when the component enters and exits Sleep state in the simulation.
  • No: No sleep event callback will be generated

Advanced

image-20230411153801156

PropertyDescription
Use CCDContinuous collision detection function. Effective only for components that are involved in physics simulation. It is recommended to be enabled only on components with excessive speed and penetrate other objects. Note: This property will cause a certain amount of performance consumption.
Always Create Physics StateAlways Create Component Physics State. When Always Create Physics State = true, the component will create physics collisions even if Collision Enable = No Collision.
Generate Overlap EventsWhether to generate overlap events when the component moves. If Generate Overlap Events = true and the current component is the root component of Game Object, then the component will perform Sweep collision detection every time it moves, and make collision determination with other components which also have the Generate Overlap Events property enabled, and generate an Overlap event callback.
Note: It can cause a significant performance consumption when many movable characters in the scene have this feature enabled. Thus when confirming whether there are objects within a certain range around the character, consider using the physics trigger.
Can Character Step Up On
  • No: The character can stand on the current component.
  • Yes: The character can not stand on the current component.
  • Owner: Whether the character can stand on the current component is determined and implemented by the CanBeBaseForCharacter function of the component Actor.