- Notifications
You must be signed in to change notification settings - Fork3.8k
examples/mask.py change default image to one with alpha channel#3111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
chimp image has a red background. When calculating collisions, the red background is determining the collision, removing the red background from the chimp image the collisions happen only between chimps, not between backgrounds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
this will only work for the current default chimp.png, not any other images supplied by a user to the example.
I think a better way to fix it right now is to swap the default image to one of the other example images that has an alpha channel rather than a colour key.
You can do this on line 207, changing it to:
imagename = os.path.join(main_dir, "data", "alien1.png")Done, changed to alien1.png |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks for the PR! 👍 🎉
chimp image has a red background. When calculating collisions, the red background is determining the collision, removing the red background from the chimp image the collisions happen only between chimps, not between backgrounds.