Box2D debug draw in a specific layer

不想你离开。 提交于 2019-12-24 12:43:11

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/22287420/box2d-debug-draw-in-a-specific-layer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!