Getting the Camera Position in Studio

Hi so I’m working on a project that needs the position of the camera in 3D space. I noticed that it was possible since the camera position status is shown in the debug bar. I can’t figure it out how to get that data. I tried to get it by doing:

camspot = ecs.Position.get(world, world.camera.getActiveEid())

The values I get are negative and not correct since the Y value should be positive since it’s raised up above the ground.

Is there a way to get that information via a different library?

Thanks!

running into same problem… Did you figure it out?

I’m working on a Sample Project that uses the Cameras position. This is how I grab it:

const camPos = world.transform.getWorldPosition(world.camera.getActiveEid())
1 Like

Oh I see! Thanks George!

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.