SetFOV does not match MaxCameraFov
by Robert Seeman · in Torque Game Engine · 11/28/2005 (12:07 pm) · 7 replies
In game/game.h, the following constants are defined:
const F32 MinCameraFov = 1.f; ///< min camera FOV
const F32 MaxCameraFov = 179.f; ///< max camera FOV
Since MaxCameraFOV is 179, what would be the reason that SetFOV in Torque Script will not allow for a FOV greater than 120? I understand that beyond 120 you start to get a fish-eye lensing effect, but our design document calls for this functionality.
Any insight the community can provide would be appreciated.
-Robert
const F32 MinCameraFov = 1.f; ///< min camera FOV
const F32 MaxCameraFov = 179.f; ///< max camera FOV
Since MaxCameraFOV is 179, what would be the reason that SetFOV in Torque Script will not allow for a FOV greater than 120? I understand that beyond 120 you start to get a fish-eye lensing effect, but our design document calls for this functionality.
Any insight the community can provide would be appreciated.
-Robert
#2
11/28/2005 (12:22 pm)
When I go to the console and type setfov(150); (or any value greater than 120 for that matter), it defaults to the 120 value.
#3
11/28/2005 (12:25 pm)
Hmm, have you tried searching the source for 120 (if that's the exact value it caps at)?
#4
Yes we have searched the code for 120, as it does cap at that exact value, but have not found any constants, function parameters or calculations in a .cc or .h that relate to FOV (other than the Min/MaxCameraFOV constants).
BTW, this is Torque 1.3 (we have a LOT of custom code that still needs to be ported to 1.4).
-Robert
11/28/2005 (12:30 pm)
Ben,Yes we have searched the code for 120, as it does cap at that exact value, but have not found any constants, function parameters or calculations in a .cc or .h that relate to FOV (other than the Min/MaxCameraFOV constants).
BTW, this is Torque 1.3 (we have a LOT of custom code that still needs to be ported to 1.4).
-Robert
#5
ShapeBaseData::ShapeBaseData() has cameraMaxFov in shapebase.cc. I must assume that would override the MaxCameraFOV constant in game.h. Does that make the const MaxCameraFov in game.h superfluous or is this used elsewhere?
We'll tinker with it and see what damage we can do to our sandbox.
Thanks!
-Robert
11/28/2005 (12:59 pm)
Ben,ShapeBaseData::ShapeBaseData() has cameraMaxFov in shapebase.cc. I must assume that would override the MaxCameraFOV constant in game.h. Does that make the const MaxCameraFov in game.h superfluous or is this used elsewhere?
We'll tinker with it and see what damage we can do to our sandbox.
Thanks!
-Robert
#6
ShapeBaseData() contains the default values. As long as MaxCameraFOV is set to 179 in game.h, then you can modify the cameraMaxFov in your "player".cs.
I'm going to have another cup of coffee with an extra shot or three put in it.
Thanks again for your time.
-Robert
11/28/2005 (1:32 pm)
Oh Good Lord....No more 4 day weekends for me!!!! :)ShapeBaseData() contains the default values. As long as MaxCameraFOV is set to 179 in game.h, then you can modify the cameraMaxFov in your "player".cs.
I'm going to have another cup of coffee with an extra shot or three put in it.
Thanks again for your time.
-Robert
#7
Glad you got this fixed!
11/28/2005 (2:09 pm)
The datablock is to enforce gameplay constraints, the constant is to enforce engine level constraints (like controlling how many bits we use to send the message).Glad you got this fixed!
Torque Owner Westy