diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-05-06 16:45:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-05-06 16:45:08 +0400 |
commit | 94e9e954b1ce5395a66b1f66d3fdc1818fe96a6c (patch) | |
tree | 1b51d34bd18063dd87228a279b986af4f318169b /source/gameengine/Ketsji/KX_MouseFocusSensor.cpp | |
parent | c1e1091f027e2d1b8a84ff5595e9a85b092f1b88 (diff) |
[#18681] Mousesensor Over doesn't work in ortho mode of 3dview camera
bugfix, the clip near/far are scaled up for some reason, so use a range between 0 - clipfar for now.
Diffstat (limited to 'source/gameengine/Ketsji/KX_MouseFocusSensor.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_MouseFocusSensor.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp index 9106902ca0e..8b7c3cb928b 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp @@ -230,18 +230,17 @@ bool KX_MouseFocusSensor::ParentObjectHasFocusCamera(KX_Camera *cam) */ frompoint.setValue( (2 * (m_x-x_lb) / width) - 1.0, 1.0 - (2 * (m_y - y_lb) / height), + /*cam->GetCameraData()->m_perspective ? 0.0:cdata->m_clipstart,*/ /* real clipstart is scaled in ortho for some reason, zero is ok */ 0.0, /* nearclip, see above comments */ 1.0 ); topoint.setValue( (2 * (m_x-x_lb) / width) - 1.0, 1.0 - (2 * (m_y-y_lb) / height), - 1.0, /* farclip, see above comments */ + cam->GetCameraData()->m_perspective ? 1.0:cam->GetCameraData()->m_clipend, /* farclip, see above comments */ 1.0 ); /* camera to world */ MT_Transform wcs_camcs_tranform = cam->GetWorldToCamera(); - if (!cam->GetCameraData()->m_perspective) - wcs_camcs_tranform.getOrigin()[2] *= 100.0; MT_Transform cams_wcs_transform; cams_wcs_transform.invert(wcs_camcs_tranform); |