Jawnnypoo / PhysicsLayout

Android layout that simulates physics using JBox2D
Apache License 2.0
772 stars 102 forks source link

Circular bounding layout #21

Open ghost opened 7 years ago

ghost commented 7 years ago

Maybe I'm missing it, but there does not appear to be a way to create a PhysicsFrameLayout (or other layout) that's boundary is a circle. I'm looking to put circle views inside a circular bounding layout. Is there a way to do this?

Jawnnypoo commented 7 years ago

Yes, this is not currently supported, but it is an interesting idea. You could achieve something similar by flagging the layout to not have bounds and to manually create circular bounds yourself as an "invisible" view within the layout

ghost commented 7 years ago

Thanks for getting back to me! How would I go about creating a circular bounds within the layout? Is this something I would have to do manually using Box2D or is it something that could be achieved with your library? Sorry, I'm not trying to get you to code my solution or anything... just wanted some clarification. If you could point me in the right direction it would be appreciated.

Dhameliya commented 4 years ago

@ghost Hi, i am using PhysicsLayout for bounding view or animate view, but i want circle boundary instead of rectangle, is there any solution for achieve boundary with circle?

Ein-xinlong commented 2 weeks ago

@ghost 你好,我正在使用 PhysicsLayout 作为边界视图或动画视图,但我想要圆形边界而不是矩形,有没有解决方案可以实现圆形边界?

I also have this requirement here. Do you have a solution? Thank you

Ein-xinlong commented 2 weeks ago

Thanks for getting back to me! How would I go about creating a circular bounds within the layout? Is this something I would have to do manually using Box2D or is it something that could be achieved with your library? Sorry, I'm not trying to get you to code my solution or anything... just wanted some clarification. If you could point me in the right direction it would be appreciated.

I also have this requirement here. Do you have a solution? Thank you