- Home /
pointcloud coordinates vs Unity coordinates
Hello,
I'm generating a depth image from Unity and then converting it to point cloud. I see the center of the point cloud the coordinates are (X, Y, Z) = (0, 0, depthfromcamera). I want to printout the coordinates in Unity with respect to camera such that it aligns with coordinates of point cloud. Any idea How can I achieve it?
Answer by SunnyChow · Oct 31, 2018 at 08:26 AM
what depth cam are you using? some depth cam( eq:kinect real sense) offer unity sdk, which should have the functions you need. If you want to do it yourself, you need more information:
Is that "point cloud" world position or just depth? what unit is it?
how long is the distance between depth cam and rgb cam
what fov is your RGB cam is?
Edit
oh it's much easier:
Camera.main.transform.InverseTransformPoint(cube.transform.position);
Answer by JeevanKumarG · Oct 31, 2018 at 09:19 AM
Sorry for confusing. I will try to put it in simple way.
I have a Unity camera and a cube infront of camera. The center of camera as Origin (X=0, Y=0, Z=0) How can I get co-ordinates of the cube with respect to camera.I want the coordinates of the cube with respect to the camera (NOT in terms of Unity World)