Giter Site home page Giter Site logo

Comments (4)

KevinCathcart avatar KevinCathcart commented on June 12, 2024

@PeridexisErrant: Is the first one a bug? In a default install of your LNP pack, left clicking while in the main menu for me brings up a cursor because of "query" part of "mousequery" specifically it does a "look", "view items", "view items in buildings" or "set building prefs". But surely you know about that. So I must be misunderstanding you here.

@everyone:
As for the offset, I'm also seeing that even in non-overlay mode. It appears to vary with the SEGMENTSIZE_Z, bigger values have much worse offsets in the Y direction for me. My clicks seem to be off by about ( SEGMENTSIZE_Z-2) tiles in the in the downward direction. It almost seems like GetPosFromScreen needs to account for the Z segment size, which makes no sense, since the getScreenFromPos function (that is the inverse) does not need to account for it.

In non-overlay mode, how far off my clicks are in the X direction seems to vary. Sometimes it is perfect, and some times it is off by half a tile in either direction. The X offset looks to be because it is using a grid of squares aligned to the window for mapping purposes, rather than a grid of squares rotated by 45 degrees which would be correct for selecting isometric tiles.

from stonesense.

KevinCathcart avatar KevinCathcart commented on June 12, 2024

I have a partial fix for this issue. With the fix I'm not seeing an offset of more than 1 square from where I clicked.
Edit Checked in as KevinCathcart/stonesense@b20f989 I plan to try to implement a proper diamond based grid for clicking, and will submit a pull request afterwards.

from stonesense.

PeridexisErrant avatar PeridexisErrant commented on June 12, 2024

I plan to try to implement a proper diamond based grid for clicking, and will submit a pull request afterwards.

Awesome.

from stonesense.

KevinCathcart avatar KevinCathcart commented on June 12, 2024

The linked pull request results in the the correct tile being selected to within a tolerance of +/- one pixel of the isometric view. You must click within the diamond shaped floor area of the tile, or where that floor area would be if not blocked by a wall or object. This can still feel slighly annoying when trying to select an object, but there is no infrastructure in place to support mapping backwards from the pixels of an object to its tile. It should still be far better than the rather random-appearing behavior of previous builds.

from stonesense.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.