Explanation:
Using the front_of_car argument for the spawn_despawn_obstacles method causes the obstacles to spawn NOT in front.
This happens only with certain image sizes for the obstacles and car, since there where some versions in which this mode worked.
Possible fixes:
- Figure out a formula to align obstacle and car by their center, which might be impossible for all car/obstacle pairs given the x and y coordinates are integers.
- Another option would be to force the images to have a certain width ratio with respect to one another, so that the formula can always apply, while allowing width modification.
- Finally the easiest would be just to enforce constant widths, non mutable, and ensure all of them allow the proper center spawn calculations.
What to look for:
- In commit
48827c233a56f99b606449f4cd9120b32acbba0d it doesn't work.
- Apparently it worked previously.
- Old image sizes where left commented, although they where used with the
coche_blanco.png and not the coche_estrecho.png.
- Look mainly in the
environment.py module for the solution, although another modules might have something to do.
Explanation:
Using the
front_of_carargument for thespawn_despawn_obstaclesmethod causes the obstacles to spawn NOT in front.This happens only with certain image sizes for the obstacles and car, since there where some versions in which this mode worked.
Possible fixes:
What to look for:
48827c233a56f99b606449f4cd9120b32acbba0dit doesn't work.coche_blanco.pngand not thecoche_estrecho.png.environment.pymodule for the solution, although another modules might have something to do.