07-17-2020 12:12 AM
Hello all, I have a vi with a 3d cube on a 3d axis. The user can move the cube along the x and y axis and rotate along all three axes. Now, I would like to display a position readout of the cube. ideally it would take the start position (0,0,0) and display how far in the x, y, z position it moves. does anyone know how to do this?
09-14-2020 08:18 AM
I think you should be able to get that information from the ModelView matrix property.
You're not actually moving the cube, you're moving the camera. The ModelView matrix describes the position and direction of the camera. The origin of the camera and the position of the cube (where you've set it) should allow you to calculate the X,Y and Z movement (relative to the camera).