Hello everyone. I'm using irrlicght & Proton SDK for mobile 3D apps and I'm just curious about one problem... That method selects only one scene node out of my arraylist of them:
That targetting condition works fine cause i have array list with 3 scene nodes and for one of them it always works... but why doesn't it work for the rest?
Ok , first you don't say _what_ goes wrong. Do you get wrong values? Did you debug it? Print it? Anything?
Then you don't give us sufficient code to reproduce anything. I mean you don't even show variable declarations or anything.
How the hell are we supposed to guess what is wrong? Maybe number_of_pigs is just 1? Or maybe your variable declaration is bad. Or maybe SetEntityVariable is totally broken... or.... we don't see your screen so we have no way of knowing.
And what I want is to display a 2d image in the 2d position od scenenode. It seems like the getScreenCoordinatesFrom3DPosition() method works only for the first scene node in my arraylist. It doesn't get the 2d coords of the rest nodes. why?
Seems this function returns indeed -10000 sometimes (no constants ... *sigh*). I see the check, but unfortunately I'm not sure right now what it means. Probably that the position is behind the camera as the documentation mentions something like that (although it says it would return -1000 then - which it does in other cases, but those are no such checks so I guess documentation is wrong here).
But it seems you can reduce this to a single test-case. What we need would be the exact camera-values (position, target, rotation, projectionMatrix, viewMatrix) your rendertargetsize (driver->getCurrentRenderTargetSize()) and one of the positions which you try to convert which go wrong.