How can I do this type of transparency?
I appreciate any help.
1 Like
2 easy ways
- You can change the opacity of the fence when the collision occurs.
- Make the fence as a png with transparency
1 Like
interesting. I will try those methods. It is a window and I donβt want it to disappear. but for other objects it can serve. Iβll try to get it to work. thanks and notice the result.
Other way is to set two animations with different names (anim1, anim2) for the window, suppose one normal (anim1) other semi transparent (anim2),
At the begining of the scene pause obj_wndow animation
if obj_player is in collision with obj_window
Change obj_window animation to anim2
This event inverted, (it means is not colliding)
if obj_player is in collision with obj_window
Change obj_window animation to anim1
1 Like
I applied to all windows from the start with a value of 100 opacity and it works perfectly. Thanks a lot.