UE4物理笔记

基本

物理资源随骨骼创建,可添加到骨骼网格上。
物理材质可添加到材质或组件或物理资源上。
通过配置PrimitiveComponent组件的Collision Presets值,可实现自定义的碰撞忽略、重叠、阻档效果,碰撞分射线碰撞、对象碰撞2种。
Collision Presets 分查询碰撞和物理碰撞,查询碰撞被 TraceByChannel 使用。
Project Setting的Collision可用于自定义Collision Presets,有NewobjectChannel,NewTraceChannel,NewProfile
使用MovementComponent组件移动,Actor的根组件支持Collision配置的碰撞,根组件下的组件不支持Collision配置,支持Physics。
LineTrace 反回的结果里有Phys Mat,材质上可附加物理材质,物理材质可使用PhysicalSurface(在配置那定义),这样就能查询到材质的物理定义了。
Actor的根组件支持Block事件,Actor的子组件支持Overlap事件

一些特殊属性记录

Use CCD

如果是真,连续碰撞检测将用于这个组件

if true continuous collisioin detection will be used for this component

Always Create Physics State

指示我们是否想要创建物理状态于所有时间(用于碰撞和仿真)。
如果将此设置为false,它仍将创建物理状态如果碰撞或模拟激活。
如果为真,连续碰撞检测将用于此组件
这可以帮助性能。如果您想避免在触发时创建物理状态的开销

Indicates if we'd like to create physics state all the time (for collision and simulation).
If you set this to false, it still will create physics state if collision or simulation activated.
if true continuous collisioin detection will be used for this component
This can help performance if you'd like to avoid overhead of creating physics state when triggers

Multi Body Overlap

如果为真,则该组件将为每个重叠的物理体生成单独的重叠,如果它是多体组件。
当FALSE时,此组件将只生成一个重叠,不管它有多少个物理体,又有多少个重叠在另一个组件/体上。
这个标志对单体部件没有影响。

If true, this component will generate individual overlaps for each overlapping physics body if it is a multi-body component. When false, this component will
generate only one overlap, regardless of how many physics bodies it has and how many of them are overlapping another component/body. This flag has no influence on single body components.

Check Async Scene On Move

如果是真,这个组件将寻找碰撞于2个物理场景运动期间 (异步场景? 异步场景主要由可破坏网格物体的破碎块使用。)
仅在异步物理场景启用并具有几何图形时才需要,并且希望测试与该场景中对象的碰撞。

If true, this component will look for collisions on both physic scenes during movement.
Only required if the asynchronous physics scene is enabled and has geometry in it, and you wish to test for collisions with objects in that scene.

Trace Complex On Move

为真,组件扫描,组件应跟踪复杂冲突于移动过程中。(例如,网格的每个三角形)
为假,碰撞将被解决不再是简单的碰撞界限代替。

If true, component sweeps with this component should trace against complex collision during movement (for example, each triangle of a mesh).
If false, collision will be resolved against simple collision bounds instead.

Return Material on Move

如果为真,组件扫描将返回材质于命中结果。

If true, component sweeps will return the material in their hit result.

Can Ever Affect Navigation

该组件是否可影响导航

Whether this component can potentially influence navigation

物理BUG

启用物理模型与未启用物理体模型在都使用导航碰撞会出BUG,可以在碰撞后都启用物理效果。
4.20启用物理后加上移动同步会出现不平滑的问题。物理模拟与移动网络同步无法同时使用,更改物理配置Replication(C++ FRigidBodyErrorCorrection)无效

walkable slope override 步行斜坡覆盖

walkable slope Behavior 步行斜坡行为
walkable slope angle 步行斜坡角度

其他

ue4碰撞检测及射线查询
Unreal Engine 4 物理模拟之物理碰撞、重叠与射线检测
UE4 移动组件

posted @ 2018-05-21 17:51  晨祷  阅读(1533)  评论(0编辑  收藏  举报