Nodes and nullPointers (Solved)

Hey guys, I'm getting problem with getting node's worldbounds.

I've connected spatial with "myNode", after trying to get worldbounds I received a nullPointer exception, I used this part of a code to get what exactly caused error:

if (myNode.getWorldBound() == null){

System.out.println("getworldBound empty");};

But if instead of myNode I use rootNode everything is ok... what's the difference between rootNode and myNode that doesn't allow me to get World Bounds?


Have you added bounds to your node? Have you updated bounds on your node?

and does myNode contain any children with Bounds ?

child.setModelBound(new BoundingBox());

Thanks guys! adding bounds to node worked… somehow I didnt though of doing that earlier >.>


Thanks again :slight_smile: