Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Actualized body points coordinates ?

edited August 2013 in Questions Posts: 35

Hello all,
I have just remarked that the points method of the body class just give always the same coordinates of the points building the body independantly of the body movements (in fact, the coordinates at the moment of the body creation). Is There an easy way to get the actualized body points coordinates while the body moves ? Thanks


  • Posts: 391

    Add your current body position (body.x and body.y) to the points. For example:

    body.points[1].x + body.x and body.points[1].y + body.y

    Use a for loop to go through all the points and add the current position to them.

Sign In or Register to comment.