#103 1.11.16 - Camera centre of rotation always on "home" cube


(Using 3rd-person camera)
If you centre on a cube with the "home" key, camera rotation is centred on that cube. However, if you pan away from that cube - the camera rotation is still centred on the cube, which is a change in behavior from pre-1.10 versions of DLE-XP.

I don't know if this was intended though - I just found the previous behavior useful.


  • karx11erx

    karx11erx - 2012-05-07

    Sorry, but I don't know how to fix this. The OpenGL based projection works completely different from the software renderer's. For OpenGL, first the current mine center's coordinates are subtracted from each vertex, then the vertex gets rotated, then the viewer offset is added to the vertex. I just cannot figure how to adjust the mine offset when moving the viewer so that the mine center would always stay in the middle of the view. It is beyond my math knowledge to understand the relationship of the unrotated and the rotated mine center. I tried unprojecting the window center, but for some reason the unproject function returns crap z values.

    Maybe you have more luck. The entire code is MineView.Renderer.OpenGL.cpp::Pan() and in ViewMatrix.cpp::CViewMatrixGL::Transform().

  • karx11erx

    karx11erx - 2012-05-07
    • status: open --> closed-fixed
  • karx11erx

    karx11erx - 2012-05-07

    I could finally figure this. I just needed a break.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks