Spatial x= new Geometry("Box",box); setMaterial(blue);
x.updateGeometricState();
BoundingVolume BV = x.getWorldBound();
it works like that, but later I dont know how to remove it,
I tried rootNode.dettachChild(x);
x disappeared but its BoundingVolume is still there (invisible)
so how can I remove BoundingVolume? and are there anyway to make BoundingVolume visible ?
thanks in advance
A bounding volume is associated with a Spatial, so when you remove/add the spatial, the bounding gets added/removed. Bounding volumes are just used for frustum culling, they are not really "physical".
What do you mean by removing a bounding volume?
A bounding volume is associated with a Spatial, so when you remove/add the spatial, the bounding gets added/removed. Bounding volumes are just used for frustum culling, they are not really "physical".
in cube Field I saw author Kyle "bonechilla" Williams used BoundingVolume and intersect to check collision.
I did the same, and after I removed the Spatial rootNode.dettachChild(x);
my character still bumps into the BoundingVolume of that Spatial ( bumping into invisible wall )
so all I want now is to remove that invisible wall, but I dont know how.
I thought SimpleApplication already have automatic frustum culling. when I move my cam to black area (it doesnt see objects) then I saw the number of triangle dropped down ^^