What features should we add to Corona?

better dynamic access to box2d fixtures (wrt multi-element bodies)

in short: while i appreciate the existing multi-element support (such as it is) during the one-time process of creating a body, true per-fixture dynamic support in general is sadly lacking across the board - functionality supported by box2d, but lacking an equivalent in CSDK.

longer:

a number of properties are exposed at the body-level only, and would be far more useful if exposed at the fixture level where they belong.

a simple example is .isSensor - box2d supports changing the sensor status of an individual fixture at runtime, while CSDK only allows that change to the entire body as a whole. this single addition would have enormous implications to the available collision detection "solutions" for objects that have alterable shapes.

but there are many others, because similarly you cannot discretely change any other such properties - density, friction, bounce - on a per-fixture basis after creation, although box2d itself supports all of those operations.

taking it further, if you COULD modify density per-fixture, that would then suggest that .getMass() should be available per-fixture as well, as it is with box2d. et cetera.

additionally, it would be EXTREMELY helpful to have access to the position of individual fixtures. imagine a "bar bell" - a rectangular bar with a circle at each end. this object is not possible to model directly with Corona SDK because the circle fixtures cannot be offset, although it is fully supported by box2d. (CSDK would require either approximating the circles with octagons, or using separate circular bodies with weld joints to a separate rectangle body - both of which are significantly inferior compromise "solutions")

essentially, CSDK needs something equivalent to body->GetFixtureList() (and fixture's GetNext()) -- some way to iterate over and access the individual fixtures. fixture objects then need all of their relevant getters/setters exposed to make them functional.

ideally, you'd also expose methods to add/remove fixtures themselves at runtime without completely destroying and recreating the host body.

3 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    David Bollinger shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base