Skip to main content

Collision Preset Editor

Overview

The Collision Preset Editor provides features for creating and modifying collision preset configurations.

image-20230316150930737

No.NameDescription
1Collision Channel PanelDisplay the Names and Collision Response types of existing collision channels. In this panel, you can create new collision channels and edit or delete the existing ones.
2Collision Preset PanelDisplay the Preset Names and Collision Types (Collision Enabled, Collision Channel and Description) of existing collision presets. In this panel, you can create new collision presets and edit or delete the existing ones.

Default Collision Preset Types

When creating a project, the Flexi Engine creates 10 collision preset types by default.

image-20230316132633843

Preset NameDescription
NoCollisionNo collision with any Game Object.
BlockAllStatic objects that are usually used to block all Game Objects.
Default Collision Channel = WorldStatic and the collision responses to all channels are Block.
BlockAllDynamicDynamic objects that are usually used to collide with all Game Objects in the scene.
Default Collision Channel = WorldDynamic and the collision responses to all channels are Block.
OverlapAllStatic objects that are usually used to create overlaps with all Game Objects in the scene.
Default Collision Channel = WorldStatic and the collision responses to all channels are Overlap.
OverlapAllDynamicDynamic objects that are usually used to create overlaps with all Game Objects in the scene.
Default Collision Channel = WorldDynamic and the collision responses to all channels are Overlap.
PawnThe character that is usually used to be operated by the player or AI.
Default Collision Channel = Pawn and the collision responses to all channels are Block.
DestructibleUsually used for destructible objects.
Default Collision Channel = Destructible and the collision responses to all channels are Block.
VehicleWheelUsually used for vehicle wheels.
Default Collision Channel = Vehicle and the collision responses to all channels are Ignore.
UIUsually used for UI Game Objects and no collision with any object.
Default Collision Channel = WorldDynamic and the collision responses to all channels are Overlap.
TriggerUsually used for physics triggers.
Default Collision Channel = Trigger, ignore WorldStatic and the collision responses to other channels are Overlap.
This means when a static object enters the range of a trigger, no event is triggered by default.

Collision Channels

The Collision Channel can determine the collision channel type of the component itself and index the collision result type in the Collision Response property of the collided object.

image-20230315104836565

PropertyDescription
NameName of the collision channel.
Collision ResponseThe default collision response value for this channel.

Note: There are 32 channel types in total, of which 14 are used by the Engine and 18 can be customized by users.

Refer to the Collision Channel property in Collision Preset Properties for detailed Engine defined channel types.

Collision Presets

image-20230315110018398

PropertyDescription
Preset NameName of the Collision Preset.
Collision EnabledThe default collision type for this Collision Preset. It determines whether the component creates physics and whether the component's collider will participate in the collision detection in the physics simulation or scene collision query.
Collision ChannelThe default channel to which the object using this collision preset belongs. During physics simulation, the collision object retrieves its own collision response to this collision channel and gives a response feedback.
DescriptionDescribe this Collision Preset.

Resources After Saving in the Editor

The default save location for the collision preset settings: %Resource%\CProfileSettings(.ini).

Opening the Collision Preset Editor

In the Component Editor, click Config -> Collision Preset in the Menu Bar to open the Collision Preset Editor.

image-20230315114106788

Creating New Collision Channels

Click the Create button in the Collision Channel panel of the Collision Preset Editor, then in the pop-up New Channel window, enter the channel Name, select a Default Response type, and click the OK button to complete the creation.

image-20230315131354640

Collision Channel Properties

image-20230315163724424

PropertyDescription
NameName of the Collision Channel.
Default ResponseSet the default collision response value, which is the default value for the channel during collision detection. After creating a new collision channel, this collision response type is configured for the newly added collision channel by default in the existing collision presets. And the same applies when creating a new collision preset.
Optional collision response values:
  • Block: The object will generate collisions with objects of the corresponding channel type.
  • Overlap: The object will not generate collisions with objects of the corresponding channel type, but will generate penetration events.
  • Ignore: The object will ignore collisions with objects of the corresponding channel type.

Modifying Collision Channels

In the Collision Channel panel, select the collision channel to be modified, click the Edit button, then modify the Name and Default Response of the channel in the pop-up Edit Channel window, and click the OK button to complete the modification.

image-20230316102208516

Deleting Collision Channels

Select the collision channel to be deleted in the Collision Channel panel and click the Delete button to complete the deletion.

image-20230315135738966

Creating New Collision Presets

Click the Create button in the Collision Preset panel and set the related properties of the new collision preset in the pop-up New Collision Preset window.

image-20230323093921561

After creation:

image-20230315142144584

Collision Preset Properties

image-20230323093902846

PropertyDescription
Preset NameName of the Collision Preset.
Collision EnabledThe default collision type for this collision preset.
  • No Collision: The component's collider will not participate in any collision detection, in which case the component will not create physics.
  • Query Only: The component's collider will participate in the collision detection only in scene collision queries.
  • Physics Only: The component's collider will participate in the collision detection only in physics simulations.
  • Query And Physics: The component's collider will participate in the collision detection in both scene collision queries and physics simulations.
Collision ChannelSet its own default collision channel.
Engine defined Collision Channel types:
  • WorldStatic Channel:Static objects whose position in the scene will not change should use this channel.
  • WorldDynamic Channel:Dynamic objects whose position in the scene may change should use this channel. E.g. objects that change position(kinematically) through the physics simulation or code control.
  • Pawn Channel:Objects representing characters whose displacement is controlled by the player or AI should use this channel. The Ragdoll collider affected by the animation will also use this channel by default.
  • Vehicle Channel:The vehicle type objects use this channel by default.
  • Destructible Channel:The destructible type objects use this channel by default.
  • Visibility Channel:Visibility collision detection channel.
  • Camera Channel:Collision detection channel for the camera and other objects.
  • Trigger Channel:Trigger dedicated channel.
DescriptionDescribe the collision preset.

Collision Responses

Set the collision response value for each collision channel of this collision preset, and the initial value is the default value set in the collision channel.

image-20230323093842400

Modifying Collision Presets

In the Collision Preset panel, select the collision preset to be modified and click the Edit button to modify the related properties of this collision preset in the pop-up Edit Collision Preset window.

image-20230323095445573

Deleting Collision Presets

Select the collision preset to be deleted in the Collision Preset panel and click the Delete button to delete it.

image-20230315143422749

For information about the collision determination method, refer to the Collision Determination Method section of the documentation Common Physics Properties.