Converting from world to local coordinates
Posted: Fri May 09, 2008 10:39 am
Hi everyone,
I am trying to create a composite body made up of a large box with several small circles sitting on each of its edges.
What I'm currently doing is creating one static body, and attaching shapes to it (1 polygon and several circles).
The problem is I can't seem to figure out the whole offset from the center of the body thing, and the circles end up in the wrong places...
Can some one point me at the right direction here? just a few lines of code that create one poly with one circle on the center of one of its edges would be
really helpful.
Also, later on how do i get the location each circle from its shape? I have the static body its attached to and offset (a member named "c" if i understand correctly).
But what's the manipulation i need to do here?
Obviously I'm missing something here, so any help for someone more experienced would be great.
Thanks,
Ehud
I am trying to create a composite body made up of a large box with several small circles sitting on each of its edges.
What I'm currently doing is creating one static body, and attaching shapes to it (1 polygon and several circles).
The problem is I can't seem to figure out the whole offset from the center of the body thing, and the circles end up in the wrong places...
Can some one point me at the right direction here? just a few lines of code that create one poly with one circle on the center of one of its edges would be
really helpful.
Also, later on how do i get the location each circle from its shape? I have the static body its attached to and offset (a member named "c" if i understand correctly).
But what's the manipulation i need to do here?
Obviously I'm missing something here, so any help for someone more experienced would be great.
Thanks,
Ehud