GDevelop-extensions icon indicating copy to clipboard operation
GDevelop-extensions copied to clipboard

Update ScreenWrap.json

Open tristanbob opened this issue 3 years ago • 6 comments

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

tristanbob avatar Jan 26 '22 02:01 tristanbob

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?

tristanbob avatar Jan 26 '22 02:01 tristanbob

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.

Bouh avatar Jan 28 '22 20:01 Bouh

FYI - Sorry for the confusion. This change is complete and ready for review. My questions were about future improvements.

tristanbob avatar Feb 08 '22 16:02 tristanbob

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.

tristanbob avatar Aug 18 '22 02:08 tristanbob

I guess I could always resubmit it as a community extension? Would that be the preferred option?

tristanbob avatar Aug 18 '22 02:08 tristanbob

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.

D8H avatar Aug 18 '22 07:08 D8H

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.

Bouh avatar Sep 27 '22 12:09 Bouh

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.

D8H avatar Sep 27 '22 12:09 D8H

Thanks for the detail.

I added the comment and tested the extension.

It can be merged.

Bouh avatar Sep 27 '22 14:09 Bouh