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

Pasting with the mouse over a point entity acts like pasting in the void #2765

Closed
ericwa opened this issue May 16, 2019 · 1 comment · Fixed by #2766
Closed

Pasting with the mouse over a point entity acts like pasting in the void #2765

ericwa opened this issue May 16, 2019 · 1 comment · Fixed by #2766
Assignees
Labels
Prio:3 Low priority: Minor problems and nice to have features Type:Bug Errors and problems
Milestone

Comments

@ericwa
Copy link
Collaborator

ericwa commented May 16, 2019

#2755 was a few things mixed together. The part with the invisible entity interfering with the paste is fixed.

However, part of it is not fixed: If your mouse is positioned over a point entity when pasting, you can still trigger the enforcer to be pasted underneath the brush as in Bal's gif. Also, often it will be pasted in midair close to the camera.

The code responsible for this is in MapView3D::doGetPasteObjectsDelta in the branch when hit.isMatch() is false. The match is true only if the first thing to hit the trace is a brush.

  • The floating in front of the camera is probably coming from grid.snap(m_camera.defaultPoint(pickRay)) (this chooses a point 256.0 units from the camera)

The "256 unit in front of the camera" logic makes sense if you're pasting in the void, but if the trace hits an entity, why don't we use the same logic as if the trace hits a brush? I.e. I'd suggest just changing the pick query here to Model::Brush::BrushHit | Model::Entity::EntityHit.

@ericwa ericwa added Type:Bug Errors and problems Prio:3 Low priority: Minor problems and nice to have features labels May 16, 2019
@ericwa ericwa self-assigned this May 16, 2019
@ericwa ericwa added this to the 2019.6 milestone May 16, 2019
@ericwa
Copy link
Collaborator Author

ericwa commented May 16, 2019

Hmm, after playing with it a bit, I think pasting should be consistent with dragging out brushes, and drag+dropping entities into the map from the inspector, both of which ignore entites and only seem to trace against brushes.

So the fix is my original idea of adding .occluded() to the query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Prio:3 Low priority: Minor problems and nice to have features Type:Bug Errors and problems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant