UE4物理笔记
基本
物理資源隨骨骼創(chuàng)建,可添加到骨骼網(wǎng)格上。
物理材質(zhì)可添加到材質(zhì)或組件或物理資源上。
通過配置PrimitiveComponent組件的Collision Presets值,可實(shí)現(xiàn)自定義的碰撞忽略、重疊、阻檔效果,碰撞分射線碰撞、對象碰撞2種。
Collision Presets 分查詢碰撞和物理碰撞,查詢碰撞被 TraceByChannel 使用。
Project Setting的Collision可用于自定義Collision Presets,有NewobjectChannel,NewTraceChannel,NewProfile。
使用MovementComponent組件移動(dòng),Actor的根組件支持Collision配置的碰撞,根組件下的組件不支持Collision配置,支持Physics。
LineTrace 反回的結(jié)果里有Phys Mat,材質(zhì)上可附加物理材質(zhì),物理材質(zhì)可使用PhysicalSurface(在配置那定義),這樣就能查詢到材質(zhì)的物理定義了。
Actor的根組件支持Block事件,Actor的子組件支持Overlap事件
一些特殊屬性記錄
Use CCD
如果是真,連續(xù)碰撞檢測將用于這個(gè)組件
if true continuous collisioin detection will be used for this component
Always Create Physics State
指示我們是否想要?jiǎng)?chuàng)建物理狀態(tài)于所有時(shí)間(用于碰撞和仿真)。
如果將此設(shè)置為false,它仍將創(chuàng)建物理狀態(tài)如果碰撞或模擬激活。
如果為真,連續(xù)碰撞檢測將用于此組件
這可以幫助性能。如果您想避免在觸發(fā)時(shí)創(chuàng)建物理狀態(tài)的開銷
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
如果為真,則該組件將為每個(gè)重疊的物理體生成單獨(dú)的重疊,如果它是多體組件。
當(dāng)FALSE時(shí),此組件將只生成一個(gè)重疊,不管它有多少個(gè)物理體,又有多少個(gè)重疊在另一個(gè)組件/體上。
這個(gè)標(biāo)志對單體部件沒有影響。
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
如果是真,這個(gè)組件將尋找碰撞于2個(gè)物理場景運(yùn)動(dòng)期間 (異步場景? 異步場景主要由可破壞網(wǎng)格物體的破碎塊使用。)
僅在異步物理場景啟用并具有幾何圖形時(shí)才需要,并且希望測試與該場景中對象的碰撞。
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
為真,組件掃描,組件應(yīng)跟蹤復(fù)雜沖突于移動(dòng)過程中。(例如,網(wǎng)格的每個(gè)三角形)
為假,碰撞將被解決不再是簡單的碰撞界限代替。
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
如果為真,組件掃描將返回材質(zhì)于命中結(jié)果。
If true, component sweeps will return the material in their hit result.
Can Ever Affect Navigation
該組件是否可影響導(dǎo)航
Whether this component can potentially influence navigation
物理BUG
啟用物理模型與未啟用物理體模型在都使用導(dǎo)航碰撞會(huì)出BUG,可以在碰撞后都啟用物理效果。
4.20啟用物理后加上移動(dòng)同步會(huì)出現(xiàn)不平滑的問題。物理模擬與移動(dòng)網(wǎng)絡(luò)同步無法同時(shí)使用,更改物理配置Replication(C++ FRigidBodyErrorCorrection)無效
walkable slope override 步行斜坡覆蓋
walkable slope Behavior 步行斜坡行為
walkable slope angle 步行斜坡角度
其他
ue4碰撞檢測及射線查詢
Unreal Engine 4 物理模擬之物理碰撞、重疊與射線檢測
UE4 移動(dòng)組件
轉(zhuǎn)載于:https://www.cnblogs.com/mattins/p/9068484.html
總結(jié)
- 上一篇: HotSpot VM运行时01---命令
- 下一篇: 事件总线模式