Debug wire not showing

Hello everybody,

i enabled the physics debug boolean but i cant see any wire or collision box in my scenes.

Rest of the program is working more or less except the debug visuals…
I’am using the stable 3.0 sdk and it is not working on any of my projects

[java]physics = new BulletAppState();
if (Globals.PHYSICS_MULTITHREAD) {
physics.setThreadingType(BulletAppState.ThreadingType.PARALLEL);
} else {
physics.setThreadingType(BulletAppState.ThreadingType.SEQUENTIAL);
}
physics.setDebugEnabled(Globals.PHYSICS_DEBUG);
stateManager.attach(physics);[/java]

Any ideas or common mistakes anyone expierenced? thanks

Have you by any chance called setApplyPhysicsLocal(true) on any of your physics controls? This can cause discrepancies between your scene and your physics debug view. But that’s just a wild guess, it is hard to tell what your problem is, since you don’t provide much information.
For your debugging efforts, it might be good to know that physics.setDebugEnabled(true) does nothing more than just attach an instance of the class BulletDebugAppState to the state manager. You can look at the implementation here, it is actually not that complicated: BulletDebugAppState

Why did you enable debug? If you didn’t add any physics objects to the physics space there will be no physics objects in the debug view either.

Thanks @christophtraut, i guess i will take a look at the implementation and try to figure it out.

@normen of course i did add objects to the physical space and they collide probably.

I tried it with jme created geometry and loaded models. None of them got the debug grid

Although:

[java]physics.getPhysicsSpace().enableDebug(assetManager);[/java]

does work but i didn’t want to use it because it is deprecated.

That is weird, as far as I know, both ways of enabling the debug view should do the same thing. If one way works for you and the other doesn’t, then this is an indication that there might be something wrong on your end. You should check that you are actually doing what you think you’re doing. For example, is your Globals.PHYSICS_DEBUG variable really set to true? Did you change something else that broke your physics? Silly stuff like that.