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

Particle::do_motor_behaviours doesn't recognize all the cases of the face change possibility #50

Open
kolayne opened this issue Jan 31, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@kolayne
Copy link
Member

kolayne commented Jan 31, 2021

Not only the map_node neighbours but also their neighbours should be checked in this piece of code:

MapNode *node_neighbors[] = {map_node->get_left(), map_node->get_top(), map_node->get_right(),
map_node->get_bottom()};
for(MapNode *neighbor : node_neighbors)
{
if(neighbor->get_face() != map_node->get_face()) // If any of the neighbor nodes is on a different face
{
// Then particle might move to a different face, so project coordinates to the polyhedron's surface
end = get_projected_vector_end(coordinates, end, map_node->get_face(), map_node->get_polyhedron());
break;
}
}

I would really appreciate a comment from @tanya-kta with a pretty detailed explanation of the reason for this (probably with a picture)

@kolayne kolayne added the bug Something isn't working label Jan 31, 2021
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

No branches or pull requests

1 participant