Would it be possible to allow per-camera configuration of FOV?
I am pretty sure that this call to R_SetFOV is the only thing that forces non-player actor-based cameras to use an FOV of 90. Would it be too intrusive to add a "double CameraFOV" variable to the Actor class, with a default value of 90., then have the R_SetFOV call use that value instead of hard-coding it to 90.f?
Doing this would at least allow the FOV to be changed via ZScript - Maybe extending ACS's ChangeCamera to take FOV as a fourth parameter could be done as well?
This would eliminate the need for a hacky render-camera-to-texture-then-plaster-that-across-the-entire-screen implementations that I'm currently working around, since that's currently the only way to get a camera with a specific FOV.
As always, I could be oversimplifying the issue...
Allow camera actor to determine FOV
Moderator: GZDoom Developers
Re: Allow camera actor to determine FOV
- Attachments
-
- camerafovtest.pk3
- (1.35 KiB) Downloaded 50 times
Re: Allow camera actor to determine FOV
I will test this when I get some time. In the meantime, I'll move it to code submissions. I don't see any problem with the code with a cursory review.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Allow camera actor to determine FOV
I cannot check right now if this is complete but it seems to be fine.
Re: Allow camera actor to determine FOV
Added a fallback FOV in case the camera is null... thanks _mental_ :D
Re: Allow camera actor to determine FOV
Shortened the code as advised.
Re: Allow camera actor to determine FOV
I went ahead and merged it - mostly because if I was to do this feature this is really close to how I would've done it.
I tested it with both the local player's FOV and with the example provided.
I tested it with both the local player's FOV and with the example provided.
Re: Allow camera actor to determine FOV
Awesome! Thanks to everyone involved!