Giter Site home page Giter Site logo

object bound calculate error about resolv HOT 3 CLOSED

solarlune avatar solarlune commented on May 11, 2024
object bound calculate error

from resolv.

Comments (3)

SolarLune avatar SolarLune commented on May 11, 2024 1

Thanks Reply! my grid size is 1

Oh, then that also might be part of the problem. The grid size in Resolv is basically how large a tile or "unit" should be in your game. Setting it to 1 means the grid is basically one pixel large, so it doesn't really do anything. As an example, in Super Mario Brothers, a single tile was 16x16 large.

And no problem~

from resolv.

SolarLune avatar SolarLune commented on May 11, 2024

Hello! Thanks for the issue and PR - appreciate it!

However, why do you think math.Ceil() should be used rather than math.Floor() to convert a position to a grid position? As an example, if you have a position of (5.5, 7.5) and the space's grid size is (8,8), then that position would be in the grid cell (0, 0), not (1, 1).

position (5.5, 7.5) convert into grid index (4, 6), it should be (5,7)

In your example, what's your grid size?

from resolv.

zt897571 avatar zt897571 commented on May 11, 2024

Thanks Reply!
my grid size is 1

from resolv.

Related Issues (10)

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.