How to get camera position of orbitcontrols

I want to see camera position in console by using orbitcontrols. How can i do this

Hi!

controls.addEventListener( "change", event => {  
    console.log( controls.object.position ); 
} 

Something like this?

3 Likes

Hi, yes i want like this thanks bro.

any approach to implement that on shadermaterial?

@playbyan1453 to implement what on shadermaterial?

yes, i have ray marching shader but it looks like the cube is using texture because im using mesh uv. I need to get the camera position and camera direction so it looks like a portal to another dimension.