-
Notifications
You must be signed in to change notification settings - Fork 3
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to make a moving Sprite2D background transparent? #4
Comments
Hello @creeper-0910 , I did not quite understand what you meant with your first sentence. Particularly the "extra border" and "background-color being visible" sections. You can still make a moving model's background transparent with this project. For every frame, you need to update the boundaries of the model as a polygon. By doing this, you tell the application which area to "draw" and which area to not. Of course, I assume that the model you use is in 2D space. Check this script.
This section in the script updates the polygon which is both drawn and that can capture the mouse input. If you call this function every frame while moving the model like I did, it will update accordingly. I tried my best to understand and help. If this is not what you were looking for, please send a video so that I can help further. 😅 |
As shown in this video, CollisionPolygon2D does not follow the model as it moves. |
Well, that behavior is as expected. In the code, the line An example code might look like this.
|
I would like to move a live2d model on a transparent window using gd_cubism.
However, since the model is moving, using CollisionPolygon2D will leave an extra border and the background color will be visible when the model moves.
I would like to know if you know how to solve this problem.
Thanks for the great project!
I am using translation.
Sorry if my English is not clear.
The text was updated successfully, but these errors were encountered: