GDevelop-extensions
GDevelop-extensions copied to clipboard
Update ScreenWrap.json
Version 0.2.0
- Added a new behavior for physics objects (Thanks Entropy!)
- Updated descriptions
Project files
ScreenWrapWithPhysics_Example.zip
Video
https://user-images.githubusercontent.com/8879811/151092622-8ac56153-3efc-44c1-9531-98c8cfd8165d.mp4
Should we update this extension to have an option to use AABB? If so, how should it be expose to the user?
- New string property called "TriggerSource", with options "Center of AABB bounding box (default)", "Center point of sprite", "Origin point of sprite"
OR
- Boolean property called "UseCenterPoint"
OR
- Some other method?
Should we update this extension to have an option to use AABB? If so, how should it be expose to the user?
Based on the center is faster and makes more sense to me than the AABB.
FYI - Sorry for the confusion. This change is complete and ready for review. My questions were about future improvements.
Should we:
- accept this PR knowing that works but has a lot of duplicated code
- people can start benefiting from using it today
Or:
- wait for someone to rewrite it to be more maintainable
I think we should accept this as-is, and we can always improve it later.
I guess I could always resubmit it as a community extension? Would that be the preferred option?
Actually there is a lot of functions but not as much events as I though. I'm fine to keep it the way it is. Sorry for the trouble.
But this should still be addressed:
- The AngularVelocity property should be hidden
- It needs a comment to explain why velocity need to be saved.
I fixed the conflicts and moved this extension into the reviewed folder.
@tristanbob There is only to add in 'doStepPreEvents' (for physics behavior) a comment for why the velocity needs to be saved. If you know, you can tell me here, and I'll do the changes, then merge this PR.
I fixed the conflicts and moved this extension into the reviewed folder.
@tristanbob There is only to add in 'doStepPreEvents' (for physics behavior) a comment for why the velocity needs to be saved. If you know, you can tell me here, and I'll do the changes, then merge this PR.
It's because Physics2 resets objects velocities when they are moved from the outside of the extension.
Thanks for the detail.
I added the comment and tested the extension.
It can be merged.