04-02-2015, 03:37 PM
(This post was last modified: 04-06-2015, 08:53 AM by Penguinum-tea.)
Hello. I'm trying to implement objects which are visible when you are close to them and are fading out when you're going from them (similar behavior you can find in some puzzle games, such as Antichamber). The first thought was about shaders, but the only thing I've found is "AlphaGen portal" which is not supported by DP. The second idea was about entity like func_wall but with alpha depending on distance from player. I've remembered about warpzone fadeout, looked at sources and tried to implement it like it's implemented in trigger_warpzone. The code became complicated and after all this entity isn't shown at all (not because of alpha (it's not even set), but because I'm doing something wrong).
So, the question is what is the correct way to implement this? Should I continue looking at sources of warpzones and other entities or is there simple way to update entitie's alpha? I understand that such entitiy is not very useful for Xonotic, but there is not much related information in Internet. Also, sorry for weird English.
So, the question is what is the correct way to implement this? Should I continue looking at sources of warpzones and other entities or is there simple way to update entitie's alpha? I understand that such entitiy is not very useful for Xonotic, but there is not much related information in Internet. Also, sorry for weird English.