[fixed] Objects not visible if far away from rootNode?

Hi!



i've got another strange problem!



I have a CameraNode together with some JMEDesktops in a node.



this node is moved around via an other GameState…



the strange thing is, that theses JMEDesktops are perfectly visible when the node hasn't been moved. (or when they're only moved a little)



if it is far away, they disappear without any understandable point.



i don't know what to do, it can't be the light, as LightCombineMode is off for the node.

i don't know if it's a missing update-xyz() call, but as it works at the center, why doesn't it work somewhere in the scene?



Thanks in advance,

Kain

did you set guiNode.setCullMode(SceneElement.CULL_NEVER) for the jMEDesktop node ?

If you use JMEDesktopState this is already done for you tho.

im not using JMEDesktopState, but i've set CULL_NEVER…


Do you probably mean "far away from the camera"? If yes, it could be the cameras far plane…

no, the root node AND the cameranode is far away from the (0,0,0) (about 2000 units)



the camera's far plane is really far away, i set that to 10000 or something like that :wink:

I don't know if that helps with JMEDesktop too, but i once had a similar problem:



I had an object that, if it was moving, disappeared after some time. If it was moving just a littlebit around the center everything was fine…



I found out that i didn't update my cam properly so JME thought that the object moved out of cam-view so it did

no longer render the object…at least that's what i thought had happened. After i fixed the cam-updating in my code it was fine.  :smiley:





Maybe that'll help





Sdyx

Or maybe you forgot some bounding boxes i noticed if you dont use them the visability is messed up sometimes

Sdyx said:
After i fixed the cam-updating in my code it was fine.  :D


mmh, it is cameranode.getCamera().update in the update method?

if it is, it doesn't help...

i set the bounds...and called updateModelBounds()...but not for every node, is this really necessary?

Sdyx was referring to the camera setup (direction, up, left). If they are e.g. not perpendicular the frustum is not properly detected.

ahh :wink:



ok, i'm currently rotating the cameranode, is it better to rotate the camera and then call updateFromCamera() in the Node?



thx for your help :wink:

Kain said:

ok, i'm currently rotating the cameranode

that should be fine

@sdyx - what have you changed?



i don't really now what to do  :?



setting the frustum manually?

things like that also happen if your objects have no or a wrong BoundingVolume.

thanks for all your help, i fixed it now!



I tried what you said sdyx, but the box was also at the correct location.



Then i saw that the box is only disappearing, like others said, when no boundingbox is set.



I tried to set BoundingBoxes everywhere…but my problem hasn't been fixed.



then i found a lockBounds() call :roll:



lockBounds removed…problem removed :wink: