[ZScript] Rendering actor through walls?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
-
hfc2x
- Posts: 646
- Joined: Mon Aug 17, 2009 11:37 am
- Location: Chule
[ZScript] Rendering actor through walls?
Exactly what it says in the title. Is it possible to make a monster/pickup/whatever actor to render through walls disregarding player's view? And if so, is there a way to toggle this during runtime?
-
Nash
-

- Posts: 17512
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: [ZScript] Rendering actor through walls?
What you're asking is not a ZScript feature but a renderer feature usually known as custom depth, meaning the OpenGL renderer and/or the software renderers have to add support for it first. I'll let Graf Zahl or dpJudas or Rachael answer whether that is possible to do with the renderers. :D
Last edited by Nash on Sun Aug 27, 2017 5:36 pm, edited 1 time in total.
-
Rachael
- Posts: 13980
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: [ZScript] Rendering actor through walls?
Currently this is not possible, and it would be a bit complicated to selectively render such actors in the GL renderer since the Z-buffer would have to be cleared and such actors would need to be rendered in an additional transparency pass.
Your best bet is to find the actor's angle from the player and then render them as part of the HUD, which is extremely hacky but it works.
Your best bet is to find the actor's angle from the player and then render them as part of the HUD, which is extremely hacky but it works.
-
Nash
-

- Posts: 17512
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: [ZScript] Rendering actor through walls?
The downside to this hack however, like the old ACS HudMessageOnActor solutions, is that this method will look completely wrong in VR headsets. :(Rachael wrote: Your best bet is to find the actor's angle from the player and then render them as part of the HUD, which is extremely hacky but it works.
-
hfc2x
- Posts: 646
- Joined: Mon Aug 17, 2009 11:37 am
- Location: Chule
Re: [ZScript] Rendering actor through walls?
Okay, I think being hacky would have to suffice in this instance if it's an unsupported feature.
¯\_(ツ)_/¯Nash wrote:this method will look completely wrong in VR headsets.
-
Rachael
- Posts: 13980
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: [ZScript] Rendering actor through walls?
True and I agree - but seeing a distant object occluding a wall right in front of you isn't going to look wholly right, either.Nash wrote:The downside to this hack however, like the old ACS HudMessageOnActor solutions, is that this method will look completely wrong in VR headsets.