You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#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.
The text was updated successfully, but these errors were encountered:
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.
#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 whenhit.isMatch()
is false. The match is true only if the first thing to hit the trace is a brush.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
.The text was updated successfully, but these errors were encountered: