Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terrain avoidance doesn't work with middle mouse button pressed in earth manipulator #1784

Open
keince opened this issue Sep 7, 2021 · 5 comments
Assignees
Labels
defect It's busted

Comments

@keince
Copy link

keince commented Sep 7, 2021

Playing with the osgearth_manip.exe example, I noticed that enabling terrain avoidance (via ToggleCollisionHandler) doesn't have any effect when using the middle mouse button (hold down and moving the mouse up and down) to move the viewpoint close to the ground.

This can be seen by using the osgearth_manip.exe with an earth file pointing to terrain data:

  1. zooming in to an area where terrain is present
  2. pressing the middle mouse button down while moving the mouse vertical until the viewpoint is under the terrain.

If terrain avoidance is enabled, the camera should clamp to the minimum distance defined and not go through the terrain surface.

@gwaldron gwaldron added the defect It's busted label Sep 8, 2021
@gwaldron gwaldron added this to the 3.3 milestone Sep 8, 2021
@gwaldron
Copy link
Owner

gwaldron commented Sep 8, 2021

I count not repro it your way, but I could repro by positioning the camera above a mountain, and then pitching up so that the camera went down into the ground underneath.

@keince
Copy link
Author

keince commented Sep 8, 2021

Okay. That is what I was trying to describe. Perhaps a screen capture would be helpful...

I first position my camera as so...
CaptureAboveGnd

@keince
Copy link
Author

keince commented Sep 8, 2021

While holding down the middle mouse button and moving the mouse cursor up on the screen, I get this...
CaptureBelowGnd

@keince
Copy link
Author

keince commented Sep 8, 2021

Toggling the collision using the 'k' key had no effect. I was still able to go under the terrain

At any rate, I'm glad you were able to repro the problem.

@gwaldron gwaldron modified the milestone: 3.3 Apr 5, 2022
@gwaldron
Copy link
Owner

gwaldron commented Apr 5, 2022

I have a fix for this, but it till have to wait until after the 3.3 release (because of breaking APIs).

@gwaldron gwaldron modified the milestones: 3.3, 3.4 Apr 5, 2022
@gwaldron gwaldron self-assigned this Apr 5, 2022
@gwaldron gwaldron removed this from the 3.4 milestone Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect It's busted
Projects
None yet
Development

No branches or pull requests

2 participants