1

This article tell how to wrap Box2D debug draw in a layer. But I do not understand why it is being drawn in the specific layer. As far as I don't know OpenGL, I don't understand where it is being drawn at all. But my problem is that I want to draw in a specific layer, so that I could put that layer on top of all layers and make Box2D shapes always visible.

Today I have found the solution how to do debug draw Box2D shapes in C++ but I cannot draw in a specific layer. Could you help me understand where it is being drawn so I could draw the Box2D shapes on top of my sprites. I want to bring them front.

Community
  • 1
  • 1
Narek
  • 38,779
  • 79
  • 233
  • 389
  • Box2d debug draw is drawn in 0th layer..so take all your sprite z-order below 0…like -1, -2,…that shows debug shapes. – Guru Mar 10 '14 at 02:21

1 Answers1

0

You could simply add another layer above your current layer.

And you can add the code you post here in the up layer then everything should be working.

0owen
  • 51
  • 4
  • How do you understand in which layer the code draws? I don't understand in which canvas the drawing is being done. – Narek Mar 12 '14 at 15:13