UE4 Collision Response Reference

本文详细介绍了Unreal Engine 4中碰撞预设、碰撞响应及追踪响应等设置,包括不同对象类型之间的交互行为定义,以及如何通过这些设置来实现特定的游戏物理效果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Collision Response Reference

There are a large number of properties and settings in the Collision Presets/Collision Response section of the Collision Properties category, so they've been separated out for clarity.

Properties

Below are the properties for the Collision Presets, a sub-category in the Collision Properties on Physics Bodies (BodyInstances).

collProp.png

Collision Presets

Property spacer.png Description
Collision Presets

The default collision profiles and any you have created in Project Settings -> Engine ->Collision -> Preset (see: []() for information on creating custom collision profiles), will appear here.

Property spacer.png Description
Custom... Set all custom collision settings for this instance.
NoCollision No Collision.
BlockAll WorldStatic object that blocks all actors by default. All new custom channels will use its own default response.
OverlapAll WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response.
BlockAllDynamic WorldDynamic object that blocks all actors by default. All new custom channels will use its own default response.
OverlapAllDynamic WorldDynamic object that overlaps all actors by default. All new custom channels will use its own default response.
IngoreOnlyPawn WorldDynamic object that ignores Pawn and Vehicle. All other channels will be set to default.
OverlapOnlyPawn WorldDynamic object that overlaps Pawn, Camera, and Vehicle. All other channels will be set to default.
Pawn Pawn object. Can be used for capsule of any playable character or AI.
Spectator Pawn object that ignores all other actors except WorldStatic.
CharacterMesh Pawn object that is used for Character Mesh. All other channels will be set to default.
PhysicsActor Simulating actors.
Destructible Destructible actors.
InvisibleWall WorldStatic object that is invisible.
InvisibleWallDynamic WorldDynamic object that is invisible.
Trigger WorldDynamic object that is used for trigger. All other channels will be set to default.
Ragdoll Simulating Skeletal Mesh Component. All other channels will be set to default.
Vehicle Vehicle object that blocks Vehicle, WorldStatic, and WorldDynamic. All other channels will be set to default.
UI WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response.
Collision Enabled

Collision Enabled can have 4 possible states as listed below.

Property spacer.png Description
No Collision No collision is enabled for this body.
Query Only This body is used only for collision queries (raycasts, sweeps, and overlaps).
Physics Only This body is used only for physics collision.
Collision Enabled This body interacts with all collision (Query and Physics).
Object Type

Enum indicating what type of object this should be considered as when it moves.

These are arbitrary, but should be set in accordance to what the Physics Body will be doing.

Property spacer.png Description
WorldStatic This should be used for any Actor that doesn't move. Static Mesh Actors are a good example of an Actor that will probably have a WorldStatic type.
WorldDynamic WorldDynamic is for Actor types that will be moving under the influence of animation or code; kinematic. Lifts and doors are good examples of WorldDynamic Actors.
Pawn Any player controlled entity should have the Pawn type. The player's character is a good example of an Actor that should receive the Pawn Object Type.
PhysicsBody Any Actor that will be moving due to the physics simulation.
Vehicle Vehicles receive this type by default.
Destructible Destructible Meshes receive this by default.
Collision Responses

These define how this Physics Body should interact with all of the other types of Trace and Object Types. Remember, it's the interaction between both Physics Bodies that define the resulting action, so the Object Type and Collision Responses of both Physics Bodies matter.

iob.png

Response spacer.png Description
Ignore Regardless of the Collision Response of the other Physics Body, this Physics Body will ignore the interaction.
Overlap If the other Physics Body is set to Overlap or Block this Physics Body's Object Type, an Overlap Event can occur.
Block If the other Physics Body is set to Block this Physics Body's Object Type, a Hit Event can occur.
Trace Responses

Trace responses are used in Traces (ray casts), such as the Blueprint Node Line Trace by Channel.

Property spacer.png Description
Visibility General visibility testing channel.
Camera Usually used when tracing from the camera to something.
Object Responses
Property spacer.png Description
WorldStatic How this Physics Body should react when interaction with a WorldStatic Physics Body Object Type.
WorldDynamic How this Physics Body should react when interaction with a WorldDynamic Physics Body Object Type.
Pawn How this Physics Body should react when interaction with a Pawn Physics Body Object Type.
PhysicsBody How this Physics Body should react when interaction with a PhysicsBody Physics Body Object Type.
Vehicle How this Physics Body should react when interaction with a Vehicle Physics Body Object Type.
Destructible How this Physics Body should react when interaction with a Destructible Physics Body Object Type.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值