UniversalCamera z position has no effect

Maybe I am really confused about how cameras work???

I have a universal camera, and I just set the position in the constructor and I set a target. The z position does not seem to make any difference. I thought it would set the camera to that position and then point it toward my target??? Is that not correct?

It’s working fine for me at https://playground.babylonjs.com/#DWPQ9R#1866?

Can you reproduce the issue you are seeing in a playground or show some other code?

Universal camera is not a TargetRotateCamera, position is where camera is, target is where camera loot at. If you need a look at camera which is rotate around target you set, you’d better to use a TargetCamera like ArcRotateCamera. If you still need a Universal Camera, you can do like this:Babylon.js Playground

All works fine in the playground - must be something wrong with my code but I can’t see it.

Not trying to get a rotate camera - just trying to create a fixed camera looking at origin from 25 up in z (so 0,0,25). I might have an idea what is wrong…

ok - 5 mins after I take a look I find the obvious problem in my code - thanks for your help, sorry to bother.


cool it’s all good