Skip to content

Differing paths for different directions #2

@bjrnt

Description

@bjrnt

Hello!

I'm very new to Rust and game development and this crate seemed like a good way to get started. I am however running into issues as the paths generated by the library are different when going in different directions.

As an example:

Computing path from Point { x: 14, y: 10 } to Point { x: 14, y: 25 }
Found Some(461v0) at Point { x: 14, y: 11 }
Found Some(462v0) at Point { x: 14, y: 12 }
Found Some(463v0) at Point { x: 14, y: 13 }
Found Some(464v0) at Point { x: 14, y: 14 }
Found Some(465v0) at Point { x: 14, y: 15 }
Found Some(498v0) at Point { x: 15, y: 16 }
Found Some(499v0) at Point { x: 15, y: 17 }
Found Some(500v0) at Point { x: 15, y: 18 }
Found Some(501v0) at Point { x: 15, y: 19 }
Found Some(502v0) at Point { x: 15, y: 20 }
Found Some(503v0) at Point { x: 15, y: 21 }
Found Some(504v0) at Point { x: 15, y: 22 }
Found Some(505v0) at Point { x: 15, y: 23 }
Found Some(506v0) at Point { x: 15, y: 24 }
Computing path from Point { x: 14, y: 25 } to Point { x: 14, y: 10 }
Found Some(506v0) at Point { x: 15, y: 24 }
Found Some(505v0) at Point { x: 15, y: 23 }
Found Some(504v0) at Point { x: 15, y: 22 }
Found Some(503v0) at Point { x: 15, y: 21 }
Found Some(502v0) at Point { x: 15, y: 20 }
Found Some(501v0) at Point { x: 15, y: 19 }
Found Some(500v0) at Point { x: 15, y: 18 }
Found Some(467v0) at Point { x: 14, y: 17 }
Found Some(434v0) at Point { x: 13, y: 16 }
Found Some(433v0) at Point { x: 13, y: 15 }
Found Some(432v0) at Point { x: 13, y: 14 }
Found Some(431v0) at Point { x: 13, y: 13 }
Found Some(398v0) at Point { x: 12, y: 12 }
Found Some(397v0) at Point { x: 12, y: 11 }
Found Some(396v0) at Point { x: 12, y: 10 }
Found Some(427v0) at Point { x: 13, y: 9 }

Here are two images displaying the different paths. As you can see, one of them is pretty strange. Just thought I'd let you know.

Thanks!

Screen Shot 2022-11-16 at 5 34 38 PM

Screen Shot 2022-11-16 at 5 34 45 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions