MantisBT - Zandronum
View Issue Details
0004224Zandronum[All Projects] Suggestionpublic2024-04-10 23:512024-04-13 19:39
BarrelsOFun 
 
lowfeatureN/A
newopen 
 
 
0004224: A function or pointer to get exact camera position
I'm trying to make a moving skybox and got pretty far using a hacky method to get the third person view using a LineAttack and PickActor to grab that, though I hit a roadblock when it comes to first person as there's no means of getting your viewz, which includes movebobbing, footclip, and the landing squash.

At some point, 'AAPTR_PLAYER_GETCAMERA' was added as a pointer, and it has its uses. However, it only gets the position of whatever the camera is focusing on and not the camera itself, making it irrelevant for what I'm trying to achieve.

If there was a way to get the camera position itself, I could remove the third person check, and have a means of getting the actual camera height in first person.
No tags attached.
Issue History
2024-04-10 23:51BarrelsOFunNew Issue
2024-04-10 23:56TrillsterNote Added: 0023590
2024-04-11 03:39KaminskyNote Added: 0023591
2024-04-11 06:32BarrelsOFunNote Added: 0023593
2024-04-13 19:39TrillsterNote Added: 0023605

Notes
(0023590)
Trillster   
2024-04-10 23:56   
I can agree that this would be useful. I've got a mod which allows players to ping locations, drawing the ping on the screen with scaling and positioning dependent on the camera actor's distance and angle. However, due to the inability to get the physical camera's location and angle, it can't handle chasecam nor death falling very well, since the camera is desynced from the actor in these cases.
(0023591)
Kaminsky   
2024-04-11 03:39   
Maybe "GetPlayerChasecam" can be extended to support an extra parameter that returns what kind of information you want (e.g. enabled/disabled, x-pos, y-pos, or z-pos). I didn't like how limited this function was since it got added in 3.1, and I'd rather combine this function and the proposed idea into something more utilitarian.

For backwards compatibility, the new parameter should be optional and return the chasecam status if unspecified.
(0023593)
BarrelsOFun   
2024-04-11 06:32   
That would work with cutting out the third person part of the code, though there's still the issue of getting viewz in First Person so the movement of the sky isn't jarring...
'https://youtu.be/7gABs9ytK6M [^]'
(0023605)
Trillster   
2024-04-13 19:39   
As long as the extended functionality to GetPlayerChasecam is capable of getting the player's camera location regardless of chasecam status, I think that could be an acceptable solution.

As an example, if the player has `r_deathcamera` disabled, their camera slowly lowers to the ground whenever they die. For scenarios such as HudMessageOnActor (or similar setups), this camera positioning isn't very easy to account for. I'd imagine that same issue exists for the view bobbing that BarrelsOFun is referring to.