Open vrad-exe opened 1 year ago
They also seem to be a lot brighter, they might be using the wrong textures or scaled wrong.
I noted this on the internal discord but didn't really get much of a response about it. I'm not sure why this happens since the code should be identical to hl2. As for it being brighter, the textures should also be the same, unless portal 2 ships the same textures which I doubt, they'll be loaded from hl2.
Thinking about it, we should maybe just replace this with a particle system so mods can customize it.
Probably a good idea to do that
I just checked, it seems to actually be a problem with the materials. In HL2 they all use the sprite
shader with $ignorez
set, but Portal 2 has changed two of them (glow04_noz.vmt
and orangecore2.vmt
) to UnlitGeneric
without $ignorez
set. Unsure how to fix this, since those materials are probably used elsewhere in Portal 2, it might still be best to just make it a particle system - I think that would require adding new copies of the matertials anyway.
As you said, a particle system would be better in general for modding. So I think that's the approach we should go with instead of just sprites and w/e it uses
I just checked, it seems to actually be a problem with the materials. In HL2 they all use the
sprite
shader with$ignorez
set, but Portal 2 has changed two of them (glow04_noz.vmt
andorangecore2.vmt
) toUnlitGeneric
without$ignorez
set. Unsure how to fix this, since those materials are probably used elsewhere in Portal 2, it might still be best to just make it a particle system - I think that would require adding new copies of the matertials anyway.
mega physcannon is unaffected by this issue
I found that this can sometimes cause bugs that can scare unprepared person
That seems like an unrelated bug somehow caused by sprites going through portals
That seems like an unrelated bug somehow caused by sprites going through portals
this happen in Portal too, but portalgun also use sprites.
The gravity gun renders sprites differently, it renders them in the world space on the serverside, while the portal gun renders them in the viewmodel layer on the client - that's actually the whole reason this issue happens in the first place, that particular sprite glow04_noz
is also used by the portal gun in P1, so it was changed to work correctly for viewmodel layer rendering, breaking it when rendered in world space.
So the issue you're referring to is probably caused by world space/serverside sprites passing through portals. Either way it's most likely not related to the issue I originally described here, so you should test it with other things (e.g. env_sprite
s parented to physics props) and open a new issue for it.
I found that in old Mapbase
builds was same problem with sprites, in latest builds this fine. May be useful to check Mapbase
gravity gun code.
We already know what the issue is
Describe the bug
The sprites on the gravity gun appear to be rendered in the main world space instead of the viewmodel space, causing them draw behind the viewmodel and clip through geometry in front of the player. They also only rotate around the Z axis, making them appear wrong when looking up/down.
https://user-images.githubusercontent.com/19228201/211984995-97f5b0a1-1f0e-420b-96bc-c446beb8f86c.mp4
Issue Map
Any
To Reproduce
Operating System
Tested on Windows 10