8000 Pasting entities are sometimes not placed right at all · Issue #2755 · TrenchBroom/TrenchBroom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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 entities are sometimes not placed right at all #2755

Closed
bstordeur opened this issue May 8, 2019 · 5 comments · Fixed by #2764
Closed

Pasting entities are sometimes not placed right at all #2755

bstordeur opened this issue May 8, 2019 · 5 comments · Fixed by #2764
Assignees
Labels
Prio:2 Medium priority: Non crash bugs that impede the user, features that add new functionality. Type:Bug Errors and problems
Milestone

Comments

@bstordeur
Copy link

When copy-pasting stuff (entities, brushes, etc. it can happen for any of them), most of the time TB pastes correctly to the surface your cursor is above, but at times it'll decide to paste somewhere behind that surface at some random distance, as seen here :
pastingwoes2

System Information

TrenchBroom 2019.5 Build v2019.5-RC5-1-gf002ad8 Release on Windows 7.
But this has always happened as far as I can remember, but I'm getting it a lot more recently I feel?

Expected Behavior

Ideally always paste on the surface, as it does most of the time.

Steps to Reproduce

Hard to say exactly, but as you can see in the gif it doesn't require any complex setup, just try to paste an entity at various camera angles on the start brush.

@ericwa ericwa self-assigned this May 10, 2019
@ericwa ericwa added Prio:2 Medium priority: Non crash bugs that impede the user, features that add new functionality. Type:Bug Errors and problems labels May 10, 2019
@ericwa
Copy link
Collaborator
ericwa commented May 10, 2019

Can reproduce. What I see is in MapView3D::doGetPasteObjectsDelta, the pick ray will alternately hit the top surface of the brush (when the enforcer is pasted on top, as expected) or hit nothing (this is unexpected), when the enforcer is pasted underneath. Need to investigate more.

@kduske
Copy link
Collaborator
kduske commented May 10, 2019

Pick results somehow outdated? Or could it have to do with our event batching that was introduced a while back?

@ericwa
Copy link
Collaborator
ericwa commented May 10, 2019

It's looking like something simpler..

When I reproduce Bal's gif, by repeatedly cutting/pasting, the pick ray in MapView3D::doGetPasteObjectsDelta is hitting the enforcer entity that is in the process of being pasted (It's been inserted into the level already by MapDocument::pasteNodes). When this happens, the pickResult.query().pickable().type(Model::Brush::BrushHit).first(); returns no result, because the brush was blocked by the entity.

I think this is all behaving as expected, the pick query in MapView3D::doGetPasteObjectsDelta is just wrong and it needs .occluded() added, so it will find brushes behind entities. This seems to fix it. Does that make sense?

@ericwa ericwa added this to the 2019.6 milestone May 10, 2019
@kduske
Copy link
Collaborator
kduske commented May 10, 2019

Well, that will fix it, but it‘s still wrong. It should sample the position before pasting. But if it works, it works ;-)

@ericwa
Copy link
Collaborator
ericwa commented May 10, 2019

Oh right, I'll see if I can fix it properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Prio:2 Medium priority: Non crash bugs that impede the user, features that add new functionality. Type:Bug Errors and problems
Projects
None yet
3 participants
0