Improvement to intersection data calculation
This commit is contained in:
@@ -60,7 +60,7 @@ pub const Road = struct {
|
||||
}
|
||||
|
||||
/// Checks whether pos coordinate is on the referenced road
|
||||
pub fn isHighlighted(self: *const Road, pos: rl.Vector2) bool {
|
||||
pub fn collides(self: *const Road, pos: rl.Vector2) bool {
|
||||
return rl.checkCollisionPointLine(pos, self.nodes[0].pos, self.nodes[1].pos, c.ROAD_SIZE);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user