`physics-3d-collision`: Fast-Path 10 says raycasts ignore triggers by default — by default they hit triggers
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 84/100
- Issue 類型
- 文件
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- unity
研究方向
閱讀 skills/physics-3d-collision/SKILL.md,尤其是 Fast-Path 10 和 Step 3(第 108–112 行和第 335–341 行)。更正對 trigger 預設值的說明,並依照 issue 中建議的修正,為被 trigger volume 阻擋的射線新增反向 fast-path。兩個部分都準確描述預設值和每次呼叫的選項後即完成。
由索引模型根據 Issue 內容生成。
描述
Plugin: 0.1.8-beta (main @ 3831ddb) · Unity: 6000.6.7f1
Problem
skills/physics-3d-collision/SKILL.md:
- L108–112, Fast-Path 10: "Cause:
Physics.Raycastignores triggers by default. Fix: passQueryTriggerInteraction.Collide, or enable Queries Hit Triggers globally." - L335–341, Step 3, repeats it.
The default is the opposite, so the diagnosis is inverted: in a default project "enable Queries Hit Triggers" changes nothing. The common real symptom — a ray stopped by an invisible trigger volume — has no fast-path, and agents may write code that assumes triggers are skipped.
Evidence
- Manual, Physics settings, Queries Hit Triggers: "Individual raycasts can override this behavior. By default, this setting is enabled." — https://docs.unity3d.com/6000.3/Documentation/Manual/class-PhysicsManager.html
Physics.Raycastdefaults toQueryTriggerInteraction.UseGlobal(https://docs.unity3d.com/6000.3/Documentation/ScriptReference/Physics.Raycast.html);UnityEngine.PhysicsModule.xml(6000.6.7f1):UseGlobal— "Queries use the global Physics.queriesHitTriggers setting."- The URP project template shipped with 6000.6.7f1 (
com.unity.template.urp-blank-17.2.6.tgz) hasProjectSettings/DynamicsManager.asset→m_QueriesHitTriggers: 1.
Suggested fix
Fast-Path 10 / Step 3: "In a default project raycasts hit triggers (Queries Hit Triggers is on by default and UseGlobal follows it). If a trigger is missed, check whether the project turned Queries Hit Triggers off, the call passes QueryTriggerInteraction.Ignore, or the trigger is on the Ignore Raycast layer (excluded by Physics.DefaultRaycastLayers) or outside the layer mask."
Add the reverse fast-path: "Ray blocked by a trigger volume → pass QueryTriggerInteraction.Ignore on that call; prefer this per call over flipping the global setting."
- 主要語言
- C#
- 星號
- 617
- 分支
- 67
- 平均合併
- 1 天 3 小時
- 30 天內合併 PR
- 13
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Unity-Technologies/unity-agent-plugin 的其他 Issue
-
難度 1/5 1 小時以內 新手友好度 80/100
Unity-Technologies/unity-agent-plugin#118 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
Unity-Technologies/unity-agent-plugin#105 · 1 則留言 ·
維護者通常 1 天內回覆
-
`ui-uitk`: USS Restrictions table bans `filter` and `transition-property`, both supported in Unity 6未關閉
難度 1/5 1 小時以內 新手友好度 85/100
Unity-Technologies/unity-agent-plugin#102 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 72/100
Unity-Technologies/unity-agent-plugin#104 · 1 則留言 ·
維護者通常 1 天內回覆
查看 Unity-Technologies/unity-agent-plugin 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
Facepunch/sbox-public#12305 ·
維護者通常 5 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
JiaFeiMiao-K-Cat/DiscImageStudio#205 ·
維護者通常 1 天內回覆
-
bug keep-fresh
難度 2/5 1-3 小時 新手友好度 68/100
Flow-Launcher/Flow.Launcher#4744 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
flyingpie/windows-terminal-quake#419 ·
維護者通常 1 天內回覆
-
enhancement help wanted
難度 2/5 1-3 小時 新手友好度 82/100