brandon-ray / foxhole-facility-planner

Create blueprints for a bunker, facility, and more using this fan-made tool for the video game Foxhole. Formerly known as Foxhole Facility Planner, this tool now features facilities, bunkers, trenches, and more!
https://foxholeplanner.com
MIT License
37 stars 12 forks source link

Selection of placed building/foundations is inconsistent #12

Closed Romboter closed 2 years ago

Romboter commented 2 years ago

When trying to move a preplaced building it is quite difficult depending on the building.

Maint. tunnels are almost impossible to move or select once placed. And for most other buildings it is hard to find the right spot to click to drag them around or modify their properties.

Possible solutions:

Foundations have a related issue, when trying to select a building that is on top of foundations it sometimes selects the foundation and that is what gets dragged

Possible solutions:

jimdcunningham commented 2 years ago

Oh wait does this still happen? My latest commit should've actually made selecting buildings much easier. I may have goofed though haha. I'm unsure about the foundation thing though.

jimdcunningham commented 2 years ago

Also, yeah I do plan on adding the ability to lock placed objects in the future just to help prevent booboos.

Romboter commented 2 years ago

The last change did make it easier to select and move objects, I was testing from my work pc earlier when I made this issue...but testing now from my home pc, chrome, and its working as expected.

I'll run the test again from my work pc tomorrow...incognito to rule out extensions.

Just thought of another idea for how to do the locking...double click the thing you want to toggle the lock against.

brandon-ray commented 2 years ago

I think it may be an issue with the browser zoom. I have noticed if I have accidentally zoomed the page (not the tool zoom) then selection can be weird and not work at all in some cases.

Skjolbir commented 2 years ago

Selection is straight up broken for me now, I cant select anything at all, whereas in the past it was inconsistent. Please just let us select from a list.

jimdcunningham commented 2 years ago

Selection is straight up broken for me now, I cant select anything at all, whereas in the past it was inconsistent. Please just let us select from a list.

Do you have any kind of scaling set on Windows or whichever OS you're using? Someone reported to us that they had theirs set 125% in 'Scale and Layout' inside of Windows and that setting it to 100% fixed their selection issues. Obviously we'll probably be able to fix this with math, but scaling / zoom by the browser / OS seems to be the culprit right now. Unless the rabbit hole goes deeper... rip

Skjolbir commented 2 years ago

150% as I am on 1440p, so its basically needed to be a comfortable monitor. I have set it to 100% and found that fixed all selection issues. Thanks for the tip!
Edit: I have found that 150% windows scaling, when paired with 67% browser scaling fixes the issue as well, which makes sense given the math (150 * 67 is about 100)

jimdcunningham commented 2 years ago

150% as I am on 1440p, so its basically needed to be a comfortable monitor. I have set it to 100% and found that fixed all selection issues. Thanks for the tip! Edit: I have found that 150% windows scaling, when paired with 67% browser scaling fixes the issue as well, which makes sense given the math (150 * 67 is about 100)

Just pushed up a commit to hopefully fix any issues with selecting buildings while browser / OS is zoomed / scaled. 👍 Also should fix issues with the wrong building being selected when they're on top of each other.

Rail selection is still borked so Ray is taking care of that haha. 🥴

Edit: Also thanks for letting us know. We appreciate you guys reporting this. ❤️

brandon-ray commented 2 years ago

Fixed rails, everything should be good. :)

Romboter commented 2 years ago

The fix looks good, I was just doing a bunch of testing around it to see if I could break it. Everything worked as expected!

The only thing I noticed was in relation to browser zoom. If you browser zoom in, all the way to for example 500% it zooms on the canvas, but if you reset the browser zoom to 0% the canvas doesn't reset zoom. Same for the reverse of zooming all the way out and then resetting zoom

It doesn't hurt functionality, just noting it as that was the only thing I found in testing the fix.

Good job on the fix <3

jimdcunningham commented 2 years ago

Nice! I'll go ahead and close this as it appears to be fixed. Thanks again!