Page 1 of 1

Adding FOV to seperate camera view?

PostPosted: Fri Dec 22, 2017 9:11 pm
by takiwa
does anyone know how this was done??

https://www.youtube.com/watch?v=uyxD3Rc ... e=youtu.be

Re: Adding FOV to seperate camera view?

PostPosted: Wed Jan 03, 2018 1:36 am
by takiwa
to clarify my question...

I know how to code a zoomFOV onto a camera. What I don't understand is how he was able to separate the cameras, and still have access to the external views as well. I have tried switchable cams (like switchable ammo) to no avail, and I can't seem to understand what kind of sorcery this is...

Re: Adding FOV to seperate camera view?

PostPosted: Sat Jan 06, 2018 12:57 am
by freddy
If i would guess, i think its using the "allow nose camera view in aircraft" code. Its a server setting that only work for planes, but you could propably use it on other vehicles to.
You have to do a little digging becasue i dont remember exactly how this works, but i think it may be just the "ObjectTemplate.SetVehicleCategory VCAir" that triggers the behavior of that "extra" camera.

rem *** AichiValCamera ***
ObjectTemplate.create Camera AichiValCamera
ObjectTemplate.OutsideHudOffset 0.004/0/3.5 <-------------

just guessing really.

Re: Adding FOV to seperate camera view?

PostPosted: Tue Jan 09, 2018 12:50 am
by takiwa
He and I already use that code. When you watch the video, he goes from a driver view to a standard sight view. This is the offset code you mentioned. I use it as well in my mod.

What he has done that I can'r figure out is he has added an additional camera view with an FOV to simulate zoom, separate from the 4 existing cam view and the offset cam. I have tried to figure this out for about 3 weeks now, and for the life of me I can't find how he did it...

Re: Adding FOV to seperate camera view?

PostPosted: Tue Jan 09, 2018 6:27 am
by freddy
hmm is the mod somewhere to download?

edit: i thought i recognized that vid :) check here http://team-simple.org/forum/viewtopic. ... 42#p108942

Re: Adding FOV to seperate camera view?

PostPosted: Tue Jan 09, 2018 10:26 pm
by Swaffy
takiwa wrote:What he has done that I can'r figure out is he has added an additional camera view with an FOV to simulate zoom, separate from the 4 existing cam view and the offset cam. I have tried to figure this out for about 3 weeks now, and for the life of me I can't find how he did it...

I'm also interested in this ...

He added Zoom to the second F9 view. So you have 1x zoom for normal F9 camera then secondary F9 camera has zoom.

Re: Adding FOV to seperate camera view?

PostPosted: Fri Jan 12, 2018 10:43 pm
by takiwa
Swaffy wrote:I'm also interested in this ...

He added Zoom to the second F9 view. So you have 1x zoom for normal F9 camera then secondary F9 camera has zoom.

actually...no. His first F9 view is of the driver view. The second F9 view (or offset cam view) is the gunner reticle. He has both of these intact. I use that same system for my mod as well. According to his video, he also has full use of F10-F12 views.

The interesting part is when he switches from the driver/gunner view (F9 and offset) to his "new" cam view which has an FOV coded to it. At least that;s what I see when I watch the vid, it seems he has actually added another cam view. Am I seeing this wrong?

Re: Adding FOV to seperate camera view?

PostPosted: Sat Jan 13, 2018 12:37 pm
by Swaffy
Oh, I get that part since I did it to a stationary scoped MG42.
ObjectTemplate.vehicleFov 0.25

I added this to the PCO and it gives the camera zoom. The camera doesn't have any code on it.

If we can find a way to toggle this zoom we could make some pretty cool stuff... also, in the video he is not switching seats. That is why the "unzoomed" camera is next to the barrel, because it is still the same seat.

I looked at the code in the mod and can't seem to find any zoom code... period. It just looks like a normal camera. The PCO doesn't have any zoom code either.

Code: Select all
rem *** TigerTower ***
ObjectTemplate.create RotationalBundle TigerTower
ObjectTemplate.setNetworkableInfo TigerTurretInfo
ObjectTemplate.setAttachToListener 1
ObjectTemplate.loadSoundScript Sounds/tigertower.ssc
ObjectTemplate.geometry Tiger_Tow_M1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasResponsePhysics 1
ObjectTemplate.hasCollisionPhysics 1
rem -------------------------------------
ObjectTemplate.addTemplate TigerGunBase
ObjectTemplate.setPosition 0/0.325/1.295
rem ObjectTemplate.addTemplate TigerTowerHatch
rem ObjectTemplate.setPosition -0.792/0.95/-0.232
ObjectTemplate.addTemplate Tiger_MG_PCO1
ObjectTemplate.setPosition -0.482/0.85/-1.05
ObjectTemplate.setRotation 180/0/0
rem -------------------------------------
ObjectTemplate.setMaxSpeed 6/0/0
ObjectTemplate.setAcceleration 100/0/0
ObjectTemplate.setInputToYaw c_PIMouseLookX

rem *** TigerGunBase ***
ObjectTemplate.create RotationalBundle TigerGunBase
ObjectTemplate.setNetworkableInfo TigerGunInfo
ObjectTemplate.setAttachToListener 1
ObjectTemplate.loadSoundScript Sounds/TigerGunBase.ssc
rem -------------------------------------
ObjectTemplate.addTemplate lodTigerCockpit
ObjectTemplate.addTemplate TigerGunBarrel
ObjectTemplate.addTemplate Coaxial_MG34
ObjectTemplate.setPosition 0.5/-0.105/-0.699
ObjectTemplate.addTemplate TigerCamera
ObjectTemplate.setPosition -0.77/-0.05/0.23
rem -------------------------------------
ObjectTemplate.setMinRotation 0/-17/0
ObjectTemplate.setMaxRotation 0/6.5/0
ObjectTemplate.setMaxSpeed 0/3/0
ObjectTemplate.setAcceleration 0/100/0
ObjectTemplate.setInputToPitch c_PIMouseLookY


rem *** lodTigerCockpit ***
ObjectTemplate.create LodObject lodTigerCockpit
rem -------------------------------------
ObjectTemplate.addTemplate TigerCockpitExternal
ObjectTemplate.addTemplate TigerCockpitInternal
ObjectTemplate.setPosition -0.77/-0.1/0.46
rem -------------------------------------
ObjectTemplate.lodSelector TigercockpitSelector

rem *** TigerCockpitExternal ***
ObjectTemplate.create SimpleObject TigerCockpitExternal
ObjectTemplate.geometry Tiger_Cannon1_M1

rem *** TigerCockpitInternal ***
ObjectTemplate.create SimpleObject TigerCockpitInternal
ObjectTemplate.geometry 1p_Tiger_Gunner_m1

rem *** TigercockpitSelector ***
LodSelectorTemplate.create DistCompareSelector TigercockpitSelector
LodSelectorTemplate.addLodDistance 1
LodSelectorTemplate.addLodComparison 0.5

rem *** TigerCamera ***
ObjectTemplate.create Camera TigerCamera
ObjectTemplate.OutsideHudOffset 0.0005/0.617/0.9

Re: Adding FOV to seperate camera view?

PostPosted: Wed Jan 17, 2018 3:03 pm
by takiwa
Swaffy wrote:I looked at the code in the mod and can't seem to find any zoom code... period. It just looks like a normal camera. The PCO doesn't have any zoom code either.

He hasn't released this code yet in the mod, just the video...I talked to him about sharing the code, but he doesn't want to, although he said it has a bug that he can't figure out, but doesn't want any help fixing it :/