Hi, I have a situation to draw something like this. I have data from the coordinate system shown in above picture(right). I have a cube placed in between Pa and Pb. I know the coordinates of Porigin, Pa, Pb respectively. I can also calculate the position of camera which is always at a constant distance from Pb. I want to see the side of the cube where the “text” is written.
My approach was:
- I swapped the Y,Z axis of the given coordinate system.
- Considered Porigin as a coordinate in 3Js world space
- Calculate Pa, Pb in 3JS world space from Porigin
- Then calculate Pcamera from Pb
- Add Pa, Pb, Pcam in the scene
Issue I am facing:
- It looks like I am seeing “text” side of the cube from an angle, means i can see other side of the cube partially. Which shouldn’t be. I should only see the side of the cube where “text” is written.
- Cant identify what could be the issue here, issue in my implementation or issue in data.
- Any idea would be helpful, or any other approach would be helpful.
- Any debugging method would be helpful. So that I can check the given to the current position of Pa, Pb and Pcam, and orientation of the cube, I am seeing the right side.
Thanks.