player view height variable
Moderator: GZDoom Developers
- DOOMERO-21
- Posts: 1423
- Joined: Wed Jan 02, 2008 10:02 pm
- Location: Chile
player view height variable
add this new code for edit the player view height any time with acs like a new setplayerproperty
Re: player view height variable
Alex in Wonderland! 
That would be a nice feature as well!
That would be a nice feature as well!
- Ed the Bat
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
- Contact:
Re: player view height variable
This would be incredibly useful for clearing out a lot of overhead in my project, so I fully support this suggestion.
Also, in the same vein, would a property for AttackZOffset also be possible? These kinda go hand-in-hand for some things I'm hoping to do.
Also, in the same vein, would a property for AttackZOffset also be possible? These kinda go hand-in-hand for some things I'm hoping to do.
- DOOMERO-21
- Posts: 1423
- Joined: Wed Jan 02, 2008 10:02 pm
- Location: Chile
Re: player view height variable
any chance to apply this?
i was waiting since july of 2012.
i was waiting since july of 2012.
- Ed the Bat
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
- Contact:
Re: player view height variable
I also would very much like to see this. Incidentally, making this an option for Set/GetPlayerProperty could also deprecate the GetActorViewHeight function, which seems to be flawed as it is, since it apparently can't accept 0 as Activator, like so many other functions.
- Ral22
- Posts: 531
- Joined: Sun Sep 05, 2010 12:09 pm
- Preferred Pronouns: He/Him
- Location: The Fortress of Dr. Radiaki
- Contact:
Re: player view height variable
Count me as a plus one on this feature. I could make some clever and neat things using this!
- Ryan Cordell
- Posts: 4349
- Joined: Sun Feb 06, 2005 6:39 am
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Capital of Explodistan
Re: player view height variable
Think I'll give it a shot and prototype it in ToB today, see how it turns out.
- Ral22
- Posts: 531
- Joined: Sun Sep 05, 2010 12:09 pm
- Preferred Pronouns: He/Him
- Location: The Fortress of Dr. Radiaki
- Contact:
Re: player view height variable
Man, Ryan. Has anyone ever told you you're the best?Ryan Cordell wrote:Think I'll give it a shot and prototype it in ToB today, see how it turns out.
- Ryan Cordell
- Posts: 4349
- Joined: Sun Feb 06, 2005 6:39 am
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Capital of Explodistan
Re: player view height variable
SetPlayerProperty doesn't really influence the player's properties in any way. SetActorProperty is sooner what one would be looking for. There is, also, ACSF_GetActorViewHeight in the source, so one should wonder if "APROP_ViewHeight" should be a SetActorProperty only thing or a separate ACS function?
- Ral22
- Posts: 531
- Joined: Sun Sep 05, 2010 12:09 pm
- Preferred Pronouns: He/Him
- Location: The Fortress of Dr. Radiaki
- Contact:
Re: player view height variable
I could gladly live with either one. If we maybe wanted to wrangle with more additions, like a setting on whether the height change is instant or goes up/down at a rate, it should be a separate function.
Re: player view height variable
Does anything but a player have a "viewheight" sort of variable, though? It probably only exists in the player_t struct, so it'd be undefined for any nonplayer actors. Set/GetActorProperty wouldn't really be the place for it, as such.
Re: player view height variable
According to http://zdoom.org/wiki/Actor_properties every actor has a CameraHeight property. I don't know if the player uses the same variable or if the player's viewheight is something different?
- Ed the Bat
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
- Contact:
Re: player view height variable
Right, right, that's the one I was thinking of. My mistake.Ryan Cordell wrote:SetPlayerProperty doesn't really influence the player's properties in any way. SetActorProperty is sooner what one would be looking for.
Looks like it.Xaser wrote:Does anything but a player have a "viewheight" sort of variable, though?
Re: player view height variable
Ah, okay. I guess the tricky part though would be that the function can't readily assume a single property, since for players there's a special case. I guess this is why there's a separate function for this in the first place. Dunno off the top of my head how hard/hacky it would be to wrap this up into SetActorProperty.
- Ed the Bat
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
- Contact:
Re: player view height variable
The effect that crouching has on a player's viewheight may also need to be taken into account. So, checking this property on a crouched player may need to understand that it's 1/2 of the 'real' current viewheight.

