CameraPick with ProjectionMode=2

Blitz3D Forums/Blitz3D Programming/CameraPick with ProjectionMode=2

Hey, i cannot pick entities with camerapick when the camera is set as ortographic projection mode.

Is this a limitation or are there any way to do this?

Solved with a very ugly trick.
When picking, change projmode to 1, zoom * 1000, then pick, then restore projmode to 2 and zoom to original value.

Why this? Because CameraPick uses always Perspective projection to pick, so zooming*1000 appears almost as ortographic...

KuRIx,

Ortho camera's are terrible in blitz, I always found that the z-ordering gets really messed up.

As you discovered, it's best is to use a normal camera, position it far from the scene and use a high camerazoom zoom. This produces the same effect as ortho view and it's much less fiddly.

Stevie.

I believe I got CameraPick working in ortographic mode but you're right often the Z-buffer can be a little dodgy. I solved this with turning on or off WBuffer, depending on what computer the game was running on.

Thanks for your reply, although disabling WBuffer doesn't allow to pick entities correctly with ortographic mode.

As i suggested before, to pick an entity in this mode, i change (just before the camerapick() command) to perspective mode, then i zoom by 1000.0, pick, then restore original zoom and ortographic mode.

It is not 100% accurate, but it works well. I was having problems with CameraProject() command too. But the same Fake works too...