touch point coordinates

is it possible to get the touch coordinate of two bodies?

I assume you mean collide (not touch; touch implies user input via screen touches).

I think your question is, given two bodies A and B that have collided, can you determine the world coordinates where that collision occurred?

Anyways, I believe the answer is, “Yes”.

  1. Go the API docs page. Solar2D Documentation — API Reference
  2. Use your browser’s search function and search for collision.
  3. You will find a ‘collision’ entry under the events column. Solar2D Documentation — API Reference | Events | collision
  4. On this page you’ll see mention of event.x and event.y. Click either and you’ll go this page with an example listener: Solar2D Documentation — API Reference | Events | collision | x
1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.