(optional) removal of display object from physics object / creating non-visible physics shapes

hi,

i think really we need the option to create physics objects that don't have to have an attached graphic. in the Flash and C versions of Box2D, (visual) graphic objects are synced the the physical world manually. Whilst this is conveniently done for us in Corona it does lead to some issues.

One of these issues I believe is potentially the rendering performance... whilst the Box2D world is supposedly optimized for offscreen/distant items (afaik), I'm not sure the Corona visual rendering is

see also the feature request on auto-culling here:
http://developer.anscamobile.com/forum/2011/01/29/object-culling-render-process-when-not-content-area

So firstly, when the physics object is offscreen, really the display object should be removed from the rendering process. (I don't know how this affects the parent display object's width etc though as really it should be the same even though the object is invisible and not rendered.

Secondly, with the ability to create abstract physics shapes, this would allow us to create physical behaviours (terrain?) that need not be tied in with specific tiles etc, without having to create a second invisible png to define the shape

thanks
J

Does creating a rectangle and setting isVisible to false accomplish what you want?

Related tangent: I would like a command to remove physics from a display object without removing the display object. removeBody() in addition to addBody()

views:2024 update:2011/9/18 20:20:08
corona forums © 2003-2011