Repository navigation
Fix CollisionShape2D clip children - #109165
DirtyDoggo wants to merge 9 commits into
Conversation
CollisionShape2D clip children
1605524 to
fccf6a5
Compare
|
Revision #2: Did some testing and found some bugs that needed fixing, so I added them. Also added debug ifdefs where they made sense. |
c8d4112 to
9f5de63
Compare
a786e61 to
0891768
Compare
0891768 to
694b55b
Compare
|
Based on discussion in the original issue thread, moved the code to I will look into doing the same for all the other related nodes in the coming days, along with fixing based on feedback. Known issue is that the Z of the debug graphic doesn't update until the node itself updates transform. I can fix it for the local |
694b55b to
0e9ec8f
Compare
|
Massive update made covering over 20 files, including fixing all the debug drawing nodes. Check commit description for more info. |
This has been done by adding the debug_canvas_item that is parented to the treet root to the base canvas_item. All the 2d nodes that did debug drawing now use this system, including: path_2d skeleton_2d visible_on_screen_notifier_2d navigation_link_2d navigation_obstacle_2d navigation_region_2d collision_polygon_2d collision_shape_2d ray_cast_2d shape_cast_2d damped_spring_joint_2d groove_joint_2d pin_joint_2d While at it, added DEBUG_ENABLED ifdefs to all the debug drawing functions to all these classes and remove their customly setup debug canvas items. As a bonus, fixed drawing of the edge_connection between navigation regions. Known issue is that if the z of the node updates via parent z updates, the z of the debug shape will not update until next redraw, but I believe it's better than having it be on top all the time.
0e9ec8f to
6d25f1b
Compare
This comment was marked as resolved.
This comment was marked as resolved.
|
The shape ignores parent modulate: godot.windows.editor.dev.x86_64_eKcvvccgEz.mp4Though if it can't be solved easily then maybe it's fine. |
KoBeWi
left a comment
There was a problem hiding this comment.
Looks good, aside from the above issue.
The CanvasItem changes could use a review from core team.
I assume it's similarly difficult thing to fix as the z_index update when parents change, since it doesn't have a notification to catch. |
|
I realized that TileMapLayer also has internal CanvasItems and it properly updates modulate and z_index. So it is doable EDIT: |
|
Are you still able to work on this PR? |
|
I can work on it.
Has been quite a while since anyone looked at it, though.
…On Thu, 26 Nov 2026, 03:53 Michael Alexsander, ***@***.***> wrote:
*YeldhamDev* left a comment (godotengine/godot#109165)
<#109165 (comment)>
Are you still able to work on this PR?
—
Reply to this email directly, view it on GitHub
<#109165?email_source=notifications&email_token=BVHNJXVGVT4IEETHQPJMJO3526LMHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMJYGEZDAOJVGY4KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-7181209568>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BVHNJXXOFKLWAN6DCVUNLHT526LMHAVCNFSNUABEKJSXA33TNF2G64TZHMYTKNRTGQ4TQMJ3JFZXG5LFHMZTEOBQG42DMNJQGWQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/BVHNJXSS5X57ITYRN5R22OL526LMHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMJYGEZDAOJVGY4KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG>
and Android
<https://github.com/notifications/mobile/android/BVHNJXVGWEQKEQAP6RDOW5D526LMHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMJYGEZDAOJVGY4KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>.
Download it today!
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
Having synced locally and built the engine, suprisingly, a lot has changed in a year, so it seems I will need to fix some stuff and test more. |
Fixes #108800
CollisionShape2D debug draw shape now doesn't get cropped by the parent.
Done by making a separate CanvasItem at the root of the scene tree that gets it's visuals and transform updated by the base node.
This issue is still present in certain other nodes (RayCast2D and Path2D were tested, but there are probably many more), so maybe those should be fixed in separate PR the same way too?