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

Collision Shape Edges don't align to next image #151

Closed
TokisanGames opened this issue Jul 23, 2023 · 0 comments · Fixed by #157
Closed

Collision Shape Edges don't align to next image #151

TokisanGames opened this issue Jul 23, 2023 · 0 comments · Fixed by #157
Assignees
Labels
bug Something isn't working
Milestone

Comments

@TokisanGames
Copy link
Owner

TokisanGames commented Jul 23, 2023

The edges of our collision meshes don't line up across regions.

image

We have 1024^2 sized heightmaps. Our HeightmapShape3D collision shape has a size of 1025^2 so that the last row (purple below) bridges the gap to the next collision shape.

image

However, there's nothing in the code to look at the adjacent map. Frankly I'm surprised that the last row is anything but zero. It seems to have some values but I don't understand from where unless our array indexing is messed up. The fix for this issue is to properly set the last row values to the same as the first row on the next image.

https://github.com/outobugi/Terrain3D/blob/41f5456e4f5eb923738b55c66d275194d7e35408/src/terrain_3d.cpp#L120-L140

Also see #152.

@TokisanGames TokisanGames self-assigned this Jul 23, 2023
@TokisanGames TokisanGames added the bug Something isn't working label Jul 23, 2023
@TokisanGames TokisanGames added this to the Beta milestone Jul 23, 2023
@TokisanGames TokisanGames moved this to In Progress in @Terrain Jul 23, 2023
@TokisanGames TokisanGames changed the title Collision Shape Artifact Collision Shape Edges don't align to next image Jul 23, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in @Terrain Jul 26, 2023
TokisanGames added a commit that referenced this issue Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant