Does Bullet work on rootNode only?


I’ve started to integrate physics into my project and have a strange problem.

I’m using my own viewports to render (for post effects) and my game level/objects are on nodes rendered by these viewports only, so there is actually nothing on the rootnode.

When I add a bouncing ball (from my nodes) to the physics space, it just hangs in space without gravity taking effect,

however, when I attach it to the rootnode it works as expected, but it bypasses the rendering effects I need that use my own viewports.

Thanks for any help.

Your own viewports also have to update their scene graph. So you have to call updateLogicalState() and updateGeometricState() on your rootNode before you render.

I’ll try that, Thanks very much.