Box2D 2.2.1

We will be updating to 2.2.1 relatively soon.

What do you guys want to see exposed.

Carlos. [import]uid: 24 topic_id: 23643 reply_id: 323643[/import]

AABB queries would be nice =) [import]uid: 16138 topic_id: 23643 reply_id: 94896[/import]

as minimal drop of performance as possible,

Tom [import]uid: 111283 topic_id: 23643 reply_id: 94898[/import]

Ohh! I have a few:

https://developer.anscamobile.com/forum/2011/11/06/set-alpha-physics-bodies-when-using-physicssetdrawmodehybrid

https://developer.anscamobile.com/forum/2012/01/10/feature-request-allow-setting-center-circular-physics-body

Also, the ability to have multiple objects grouped as a single “body” would be awesome. [import]uid: 49447 topic_id: 23643 reply_id: 94920[/import]

Rope Joint would be nice. [import]uid: 96906 topic_id: 23643 reply_id: 94955[/import]

Thanks for asking ! :slight_smile:
Reducing the elastic behavior of the pivot joints would be a very welcome addition, as per several forum threads that go a long way.

Also, it would be great to expose

body.getLinearVelocityFromLocalPoint ( b2Vec )  

which seems to be instrumental in killing sideways velocity in the top-down car games alike:
http://www.emanueleferonato.com/2009/04/06/two-ways-to-make-box2d-cars/

These examples work fine in Flash and JavaScript.

Thanks a bunch :slight_smile:
N [import]uid: 80100 topic_id: 23643 reply_id: 94959[/import]

I don’t follow what’s in Box2D specifically, but I would like to be able to dynamically adjust the scale of the physics based on the scaling of the object. With physics debugging on, I noticed that changing the size of the object does not change the size of the polygon. [import]uid: 6084 topic_id: 23643 reply_id: 95011[/import]

+1 for Rope joint. That would be very nice to have. [import]uid: 123125 topic_id: 23643 reply_id: 95087[/import]

I hope that we can draw polygon with texture filling and set it as physics object (ground or wall). This will save a lot of space and reduce the amount of graphics assets needed. Physics world will be easier to draw and implemented. This seems more like a drawing feature though. =\ [import]uid: 12979 topic_id: 23643 reply_id: 95090[/import]

RayCast would be nice… then we would be able to slice objects…
[import]uid: 9592 topic_id: 23643 reply_id: 95093[/import]

Some features suggestion based on box2d manual:

  • Rope Joint: as mentioned by @mobox
  • Distance: compute the distance between 2 shapes
  • Time of impact: prevent moving objects from tunneling outside of static level geometry
  • GetBodyList(): Ability to get list of all bodies in a world (to set Awake, Destroy etc)
  • Shape Ray Cast
  • Ray Casts
  • DestructionListener - get informed when joints or physic bodies are destroyed (e.g. pigs in angry birds are destroyed). This is very useful so that we don’t need to set an enterFrame or timer event for this purpose.
    [import]uid: 12979 topic_id: 23643 reply_id: 95094[/import]

-Collision coordinates and normal
-Change filter bits after object created
-Raycasts
Thanks! :slight_smile: [import]uid: 62236 topic_id: 23643 reply_id: 96367[/import]

Would be great to have possibility to create more than one Box2dWorld… Today it’s hard to mix elements on one screen if they mess with global physics settings (gravity etc.) - hard to create particle engine, mixing effects with various scale/gravity etc.

Maybe easy/backward compatible way would be to just treat world as context and add physics.setCurrentWorld()? [import]uid: 42082 topic_id: 23643 reply_id: 97184[/import]

@krystian9, i think this feature (like some others in this thread) does not exist in original Box2D engine, and therefore their implementation would bring many additional complexities to Box2D Corona. I would advise in case you need to create separate worlds -UNLESS you need to have each of them respond to different gravity or timestep–, that you create different display groups and overlay them to get effect that there are different physics worlds taking place independently on screen.

for example, you might have a FRONT SCENE, in one display group, that takes place around x,y=0,0 coordinates, and BACK SCENE that takes place (in world coordinates) around some far off-screen coordinates, ie. x,y=2000, 0… then move entire back screen 2000 pixels to left and it will overlap with front scene but the objects will not collide between different scenes.

not sure if this is exactly what you wanted, but there are always some workarounds, and sometimes it’s better to use these workarounds, in order keep the basic engine clean, neat and fast.

[import]uid: 80100 topic_id: 23643 reply_id: 97190[/import]

Rope joints [import]uid: 40137 topic_id: 23643 reply_id: 97198[/import]

I don’t know what features Box2d 2.2.1 gives us over what we have now, but I certainly would like kinematic things to trigger collisions or to give individual objects their own gravity. [import]uid: 19626 topic_id: 23643 reply_id: 97201[/import]

@nosheet, Box2D supports the creation of multiple worlds - used that in past.

I agree workarounds exists though physics could be used in more creative way with that feature.

For example you could create display group/scene with particles controlled by changing gravity etc. (wind?) etc.

[import]uid: 42082 topic_id: 23643 reply_id: 97284[/import]

HitTest Points would be awesome, if that could be integrated. :smiley:
[import]uid: 122802 topic_id: 23643 reply_id: 97718[/import]

@Carlos: any timeline for upgraded box2d? will it make its way into next stable? (btw when next stable will happen? - would love to see corona with new sprite api stable…) [import]uid: 42082 topic_id: 23643 reply_id: 97743[/import]

Rope joints +1 [import]uid: 67616 topic_id: 23643 reply_id: 97826[/import]