EntityInView

Blitz3D Forums/Blitz3D Programming/EntityInView

big10p(Posted 2007) [#1]
This command doesn't seem to work with orthographic cameras - it always returns True. Reckon I should report this as a bug, or is it considered a 'feature' of ortho cams?


Dreamora(Posted 2007) [#2]
Are you sure it is not in view? (in view isn't the same as blocked visual line by some other entity)

if so, then its a bug, then the projection back onto the "visual plane" does not take ortho into account. In that case I would guess that the camprojection stuff does not work as well in ortho


big10p(Posted 2007) [#3]
I just tested with a single cube I move around the screen. It works with a regular camera but with an ortho one, I moved the cube way, way out of view of the camera but it always returned True.

I'll report it as a bug.


DJWoodgate(Posted 2007) [#4]
It think it works, but as per the perspetive camera. That is to say as though ortho mode was not enabled. Since you will probably have set a low zoom your equivalent fov wil be very large. I seem to remember raising this a year or so ago... http://www.blitzbasic.com/Community/posts.php?topic=33113#356259

I think it is an ommision. Ortho was a late addition and I do not think all the dependencies were worked through.


Matty(Posted 2007) [#5]
Cameraproject works fine , but I discovered as well for myself that EntityInView does not work for ortho cameras. Didn't think to report it as a bug.


Stevie G(Posted 2007) [#6]
Is this for your vector lib big10?


big10p(Posted 2007) [#7]
Stevie: Kind of. I was testing to see how EntityInView works so that my implementation works in the same way. The docs say it checks the bounding box for meshes - I wasn't sure if it meant the bounding box set with EntityBox, or the box that bounds the mesh as it appears on screen. It appears to be the latter.


_33(Posted 2007) [#8]
Does this EntityInView still work when your mesh is unsoldered but closed?


big10p(Posted 2007) [#9]
It seems to just work on the bounding box defined by the vertex mass, so it should work.


Azaratur(Posted 2007) [#10]
Sorry for the question.. What is an ortho cam?


big10p(Posted 2007) [#11]
It's an orthograpic camera, which basically means everything gets rendered without perspective. For example, if you have a cube and keep moving it further and further away from the camera, it wont get smaller on screen, as it would using a regular perspective camera.