Skip to content

Commit

Permalink
[world] Don't attempt to access children of cubes that aren't octants
Browse files Browse the repository at this point in the history
  • Loading branch information
yeetari committed Jun 17, 2021
1 parent e67b02b commit b0b2c46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vulkan-renderer/world/collision_query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ std::optional<RayCubeCollision<Cube>> ray_cube_collision_check(const Cube &cube,
return std::nullopt;
}

if (cube.type() != Cube::Type::SOLID) {
if (cube.type() == Cube::Type::OCTANT) {
std::size_t hit_candidate_count{0};
std::size_t collision_subcube_index{0};
float m_nearest_square_distance = std::numeric_limits<float>::max();
Expand Down

0 comments on commit b0b2c46

Please sign in to comment.