ReferncePoint for Sprites and physics bodies

I created some physics bodies from sprites. It appears that collisions occur up and to the left of where the body appears on the screen. I'm guessing this is a problem with the reference points.

Viewing in hybrid mode the debug drawing appears over the art but the physics body is still up and to the right.

Not sure what to do here. Is it possible to offset the physics object? Not sure bodies have reference points.

Sprites with physics objects open up a lot of great possibilities. While also keeping the memory footprint small.

After some experimentation, I find that setting the shape of the box offsets the physics body to the correct location. But, the debug outlines are not in the correct location!

I used the following to offset the shape of the box.

shape={ 0, 0, 32, 0, 32, 32, 0, 32 }

Sorry, is this solved now? If not can you put up a sample we could check out, please?

Peach :)

Thanks for the reply. The solution I posted above seems to work, but the debug outline seems to be offset by half the height and width down and to the right.

Ah yes, the center - I believe currently that may be unavoidable, although a post in feature requests could be a good idea?

Peach :)

views:1376 update:2012/1/4 9:12:54
corona forums © 2003-2011