'setCameraFOV' is not doing anything at all...
by Nicolai Dutka · in Torque Game Engine Advanced · 08/24/2009 (5:18 pm) · 4 replies
I recall having binoculars in a game I created a couple years ago which used 'setCameraFOV' to 'zoom in' allowing you to see farther. That game was using TGE 1.5.2. Now I have TGEA 1.8.1 and I cannot for the life of me get 'setCameraFOV' to do anything at all... No errors either!
I made my client and player global in game.cs:
$client = %client;
$player = %player;
Now I can reference them any time I want to while making the game by using those variables. I did the classic: $player.dump
I can see 'setCameraFOV' as an available method, but no matter what I set it to, nothing happens at all...
I've also tried it on:
$client.setCameraFOV
$client.camera.setCameraFOV
$player.setCameraFOV
$player.camera.setCameraFOV
I even went as far as creating a brand new camera via console:
Still nothing!
This is getting VERY frustrating! Any ideas would be much appreciated. :)
I made my client and player global in game.cs:
$client = %client;
$player = %player;
Now I can reference them any time I want to while making the game by using those variables. I did the classic: $player.dump
I can see 'setCameraFOV' as an available method, but no matter what I set it to, nothing happens at all...
I've also tried it on:
$client.setCameraFOV
$client.camera.setCameraFOV
$player.setCameraFOV
$player.camera.setCameraFOV
I even went as far as creating a brand new camera via console:
$cam1 = new Camera() {
dataBlock = Observer;
};
$client.setCameraObject($cam1);
$cam1.setcameraFOV(120);Still nothing!
This is getting VERY frustrating! Any ideas would be much appreciated. :)
#2
0,1,10,45,80,90,120
None of them do anything to any of my cameras.
I even went back to the stock 'T3D' game example and couldn't get the setCameraFOV to do anything at all there either. Tried it in TGE 1.5 and it is working...
08/24/2009 (5:42 pm)
I've tried all kinds of numbers:0,1,10,45,80,90,120
None of them do anything to any of my cameras.
I even went back to the stock 'T3D' game example and couldn't get the setCameraFOV to do anything at all there either. Tried it in TGE 1.5 and it is working...
#3
I believe it works,because it is not difficult to see the console method in shapebase,what inputs and what you get.
also try observeThroughObject = true;
08/24/2009 (5:46 pm)
Have you tried setting it on the serverside scripts ?I believe it works,because it is not difficult to see the console method in shapebase,what inputs and what you get.
also try observeThroughObject = true;
#4
08/24/2009 (6:01 pm)
Using just plain 'setFov' works! I found this in the default.bind.cs under 'toggleZoom' which is a function I guess I was not aware of...
Torque Owner Ivan Mandzhukov
Liman3D
fov = getMax(getMin(FOV, mDataBlock->cameraMaxFov), mDataBlock->cameraMinFov);
if you input 120 :
fov = getMax(getMin(FOV, 120),5) = 120;
Obviously nothing happens.