diff --git a/src/common/constants.odin b/src/common/constants.odin index 4cd0e0b..5ea2fad 100644 --- a/src/common/constants.odin +++ b/src/common/constants.odin @@ -14,7 +14,7 @@ ROAD_SIZE :: 20 // Radius of the node NODE_RADIUS :: 20 // Size of designated radius that determines when position is within node's 'sphere' -NODE_SNAP_RADIUS :: 3 +NODE_SNAP_RADIUS :: 3 * NODE_RADIUS // Default text size TEXT_SIZE :: 50 diff --git a/src/draw.odin b/src/draw.odin index e2c02c1..37b8d13 100644 --- a/src/draw.odin +++ b/src/draw.odin @@ -36,7 +36,7 @@ draw_roads :: proc(self: ^Simulator) { draw_nodes :: proc(self: ^Simulator) { for &node in self.nodes { // draws the snapping radius if key is held down - if self.show_details do rl.DrawCircleV(node.pos, common.NODE_SNAP_RADIUS * common.NODE_RADIUS, common.NODE_SNAP_COLOUR) + if self.show_details do rl.DrawCircleV(node.pos, common.NODE_SNAP_RADIUS, common.NODE_SNAP_COLOUR) // draws the node rl.DrawCircleV(node.pos, common.NODE_RADIUS, common.NODE_DONE_COLOUR) } diff --git a/src/infrastructure/node.odin b/src/infrastructure/node.odin index 15b3f97..4f29456 100644 --- a/src/infrastructure/node.odin +++ b/src/infrastructure/node.odin @@ -32,7 +32,7 @@ node_within_snapping_radius :: proc(self: ^Node, pos: rl.Vector2) -> bool { return rl.CheckCollisionPointCircle( pos, self.pos, - common.NODE_SNAP_RADIUS * common.NODE_RADIUS, + common.NODE_SNAP_RADIUS, ) }