Having issues trying to adapt Off-Axis Camera Projection

I’m trying to mimic this kind of effect

For that, there are several links for literature like:
https://forum.unity.com/threads/code-sample-off-center-projection-code-for-vr-cave-or-just-for-fun.142383/
http://160592857366.free.fr/joe/ebooks/ShareData/Generalized%20Perspective%20Projection.pdf

Besides that, my tracker seems to be pretty correct (it can be seen in the upper label)
https://www.babylonjs-playground.com/#NIPBKR#8 The effect is not working properly and since the object was placed on the 0 0 0 only rotation should be done.

Notice that you need to set your screen size on the constant variables at the beginning of the code.

const actual_screen_width = 54;
const actual_screen_height = 30;
const webcam_screen_distance = 0.5;

I know that most probably the problem is my lack of maths but I’m driving nuts there so any tip is welcome.

Thank you!

Hmmm, doesn’t seem to work on my iPhone. I get a camera access request but then all I see is the Babylon logo spinner.

1 Like