Universal camera target & position

Hi there

document.getElementById("cam2Pos1").setAttribute('value',camera2.position.z);
document.getElementById("cam2Targ1").setAttribute('value',camera2.getTarget().z);

I try to read-out a univresal cameras position to save it into a database, but i get the same values for .getTarget & .position. Both give me the current positon.

Q: How can i read-out the current target?

thanks & best,

Hey!

do you mind sharing your code on the playground?

Hey - i just created a playground and - f*k there it’s working - so now i know that the error must be somewhere else… give me 30min - i will update this thread

1 Like

The problem was: the difference between the position and the target of the cameras are very little. example: Position Vector3 X = 424,634, Target Vector3 X = 424,271. So i did not realized that it actually works, the difference between the numbers are just very small.

1 Like