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 移動組件
轉載于:https://www.cnblogs.com/mattins/p/9068484.html
總結
- 上一篇: HotSpot VM运行时01---命令
- 下一篇: 事件总线模式