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

bugfix: hexes should accurately respond to pointer x, y #2253 #2399

Merged
merged 1 commit into from
Jul 6, 2023
Merged

bugfix: hexes should accurately respond to pointer x, y #2253 #2399

merged 1 commit into from
Jul 6, 2023

Conversation

andretchen0
Copy link
Contributor

@andretchen0 andretchen0 commented Jul 6, 2023

This fixes #2253.

hitArea points were producing a polygon of the wrong size.

The code's a bit hacky, as the width/height dimensions in Hex are converted to polygon points using some "magic" numbers.

@vercel
Copy link

vercel bot commented Jul 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ancientbeast ✅ Ready (Inspect) Visit Preview Jul 6, 2023 9:40pm

@ghost
Copy link

ghost commented Jul 6, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@DreadKnight
Copy link
Member

DreadKnight commented Jul 6, 2023

@andretchen0 Unlike HoMM3, we squished the hexagons a bit so that they seem in perspective in order to enhance that.

@andretchen0 andretchen0 marked this pull request as ready for review July 6, 2023 21:48
@DreadKnight
Copy link
Member

@andretchen0 Tested, while not pixel perfect, still a huge improvement and it also fixes a very weird issue apparently:
2023-07-07 01-00-48 (trimmed)

@andretchen0
Copy link
Contributor Author

@andretchen0 Tested, while not pixel perfect, still a huge improvement and it also fixes a very weird issue apparently

Thanks for testing. Will have a look tomorrow.

@DreadKnight
Copy link
Member

@andretchen0 Ok, will merge as it is right away; you fixed that stuff I made the gif for, so no worries about it 👍🏻
Anyway, if you manage to make it more pixel perfect, feel free to make another PR and even target the old issue.

@DreadKnight DreadKnight merged commit 23d7b22 into FreezingMoon:master Jul 6, 2023
4 checks passed
@andretchen0
Copy link
Contributor Author

andretchen0 commented Jul 6, 2023

@andretchen0 Tested, while not pixel perfect, still a huge improvement and it also fixes a very weird issue apparently: 2023-07-07 01-00-48 (trimmed)

Hold on. Is the issue in the gif you posted the "weird issue [that was fixed]" that you were talking about? Or is it still an issue with this PR?

I can't reproduce anyway.

Edit: nevermind. We're both posting. I just saw your response. ;)

@andretchen0 andretchen0 deleted the hex-hitarea branch July 6, 2023 22:15
@DreadKnight
Copy link
Member

@andretchen0 Tested, while not pixel perfect, still a huge improvement and it also fixes a very weird issue apparently: 2023-07-07 01-00-48 (trimmed)

    [
      
    
        ![2023-07-07 01-00-48 (trimmed)](https://user-images.githubusercontent.com/587487/251585743-954b5279-de59-4007-88f2-be397b34d51a.gif)
      ](https://user-images.githubusercontent.com/587487/251585743-954b5279-de59-4007-88f2-be397b34d51a.gif)
    
    
      
        
          
        
        
          
          
        
      
      [
        
          
        
      ](https://user-images.githubusercontent.com/587487/251585743-954b5279-de59-4007-88f2-be397b34d51a.gif)

Hold on. Is the issue in the gif you posted the "weird issue [that was fixed]" that you were talking about? Or is it still an issue with this PR?

I can't reproduce anyway.

That was something I discovered in the beta before merging that I wasn't fully aware of; opened new issue just to close it with this PR as well, for the sake of issue history. All good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hexes don't accurately respond to mouse [bounty: 60 XTR]
2 participants