Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notify CSGPolygon about transform changes in Path3D #85455

Merged

Conversation

xiongyaohua
Copy link
Contributor

@xiongyaohua xiongyaohua commented Nov 28, 2023

Fix #82024

Path3D notify transform change to CSGPolygon.

2023-11-28.10-58-22.mp4

@xiongyaohua xiongyaohua requested review from a team as code owners November 28, 2023 02:51
@xiongyaohua xiongyaohua force-pushed the fix_CSGPolygon_not_following_Path3D branch from 28412c0 to 58deec3 Compare November 28, 2023 02:54
@Chaosus Chaosus added this to the 4.3 milestone Nov 28, 2023
@Chaosus
Copy link
Member

Chaosus commented Nov 28, 2023

Please amend the commit name to the actual PR name.

@xiongyaohua xiongyaohua force-pushed the fix_CSGPolygon_not_following_Path3D branch from 58deec3 to 5f870bb Compare November 28, 2023 08:29
@xiongyaohua
Copy link
Contributor Author

Please amend the commit name to the actual PR name.

done

Copy link
Member

@kleonc kleonc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it need adding/exposing transform_changed signal? 🤔

It seems rather strange design-wise that specifically Path3D would have such signal given that transform is Node3D's property. I suggest production team reconsidering this API-wise before merging.

@xiongyaohua
Copy link
Contributor Author

xiongyaohua commented Nov 29, 2023

It seems rather strange design-wise that specifically Path3D would have such signal given that transform is Node3D's property.

Ideally the signal should be on Node3D, however according to this comment that will strongly hit performance, so I only add it to the Path3D to minimize impact. Of course if there is better way I can make change accordingly.

@YuriSizov YuriSizov changed the title Path3D notify transform change to CSGPolygon Notify CSGPolygon about transform changes in Path3D Dec 19, 2023
@YuriSizov
Copy link
Contributor

Ideally the signal should be on Node3D, however according to this comment that will strongly hit performance, so I only add it to the Path3D to minimize impact.

I would say that given the comment you've linked, this is not an appropriate solution. We could probably add a way to hook a function pointer from the CSG shape into the path instead. That should be as cheap as doing the notification, performance wise, and won't expose anything to the API.

@AThousandShips
Copy link
Member

Like how ViewPanner works, with some callback

@xiongyaohua xiongyaohua force-pushed the fix_CSGPolygon_not_following_Path3D branch from 5f870bb to 4024158 Compare January 8, 2024 09:38
@xiongyaohua xiongyaohua force-pushed the fix_CSGPolygon_not_following_Path3D branch from 4024158 to 0e344f0 Compare January 8, 2024 10:29
@xiongyaohua
Copy link
Contributor Author

Like how ViewPanner works, with some callback

done.

@akien-mga akien-mga merged commit 4859f80 into godotengine:master Feb 15, 2024
15 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Moving Path3D does not trigger a CSGPolygon draw update
7 participants