主权项 |
1. A computer-implemented method for avoiding collisions between a plurality of objects traversing a multi-lane path included in an animation, the method comprising:
assigning a different lane coordinate to each object in the plurality of objects, wherein the lane coordinate assigned to a first object identifies a first lane of the multi-lane path and a location on the first lane that the first object currently occupies; identifying a set of neighboring objects associated with the first object traversing the first lane, wherein each neighboring object in the set of neighboring objects traverses a particular lane of the multi-lane path and is within a pre-determined distance of the first object; computing, via a processor, a different collision relationship between the first object and each neighboring object in the set of neighboring objects based on a speed of the first object and a speed of the neighboring object, wherein the collision relationship between the first object and a particular neighboring object indicates whether the first object is projected to collide with the particular neighboring object; determining, based on a first collision relationship between the first object and a first neighboring object in the set of neighboring objects, that the first object is projected to collide with the first neighboring object; and performing a collision avoidance operation to prevent the first object from colliding with the first neighboring object. |