Supposing I have a 3d table with some balls on it and for some reason I wanted to draw a cross over each one in 2D.
Unless I'm going a bit mad this should work:
Except it doesn't. The X coord is fine but the y coord is way off (up the screen)
After tons of fiddling I had to add approx 1/3 of the viewport height to the y coord. No idea what's going on but it works in various resolutions.
Any idea what's going on?
letterbox_bar = viewport distance from top of screen.
viewport_h = height of viewport
Unless I'm going a bit mad this should work:
For Local that:ball=EachIn ball_list[active_player] bbCameraProject table_camera,bbEntityX (that.ball_mesh),bbEntityY (that.ball_mesh),bbEntityZ (that.ball_mesh) Local sx=bbProjectedX() Local sy=bbProjectedY()+letterbox_bar bbLine sx-100,sy,sx+100,sy bbLine sx,sy-100,sx,sy+100 Next
Except it doesn't. The X coord is fine but the y coord is way off (up the screen)
After tons of fiddling I had to add approx 1/3 of the viewport height to the y coord. No idea what's going on but it works in various resolutions.
Local sy=bbProjectedY()+letterbox_bar+(viewport_h/3.33)
Any idea what's going on?
letterbox_bar = viewport distance from top of screen.
viewport_h = height of viewport