Hi guys,
when I cycle through vehicle cam views using the 'c' key, one of the cams is looking back at my vehicle's front. Is there a way to alter the angle of that cam so that it's looking down on the vehicle from above, via .tweak files?
Thanks for any suggestions,
Mark
Back-looking cam angle change
-
rPoXoTauJIo
- PR:BF2 Developer
- Posts: 1979
- Joined: 2011-07-20 10:02
Re: Back-looking cam angle change
Code: Select all
ObjectTemplate.create Camera cf_jet_cf18_Camera
ObjectTemplate.CVMFrontChase 1
ObjectTemplate.nosePos 0/0/2
ObjectTemplate.chaseDistance 3.25
ObjectTemplate.chaseAngle 0.18
ObjectTemplate.chaseOffset 0/1/0.5
assetruler69: I've seen things you smurfs wouldn't believe. Apaches on the Kashan. I watched burned down tank hulls after the launch of the single TOW. All those moments will be lost in time, like tears in rain.
Time to give up and respawn.
-
Arab
- PR:BF2 Developer
- Posts: 2898
- Joined: 2012-05-18 03:37
Re: Back-looking cam angle change
Yes, it can be done.
This is how you do it based off the camera settings used for the Logistics Trucks.
It can also be easily be tweaked and previewed using the BF2Editor.
This code (The 2nd copy of it) is the number of the Field-Of-Vision for the 'C' Camera.
Increasing it will give you a wider view radius.
You can also apply the same effect to SoldierCamera.tweak
Just be sure to add ObjectTemplate.CVMInside 0 so it will automatically switch to what is set to 1.
Only issue is figuring out how to make the weapon set to a neutral Y axis position to have a GTA-style experience.
That probably can be done somehow using a RotationalBundle added to the soldier code with the setRotation settings.
As [R-DEV]rPoXoTauJIo said, try to experiment with the camera code to see what does what
This is how you do it based off the camera settings used for the Logistics Trucks.
Code: Select all
ObjectTemplate.CVMChase 1
[b]rem When 1, Camera sets it to face North[/b]
ObjectTemplate.CVMFrontChase 0
[b]rem When 1, Camera sets it to face South. We want to point it north, so disable.[/b]
ObjectTemplate.CVMFlyBy 0
[b]Leave to zero since we don't want the FlyBy camera, or don't use the code which by default gets set to 0[/b]
ObjectTemplate.followStiffness 0
[b]rem Leave this to 0 so the camera doesn't rotate when you move left or right otherwise it'll wobble with the chase angle set[/b]
ObjectTemplate.chaseDistance 10
[b]rem Increase the value to go higher[/b]
ObjectTemplate.chaseAngle 90
[b]rem Setting it to 90 gives it the top-down perspective[/b]
ObjectTemplate.chaseOffset 0/0/0
[b]rem Put as zero. Can adjust it to go to the left or right X/-/-, to go higher -/Y/- or to position it in or out -/-/Z.[/b]
Code: Select all
ObjectTemplate.worldFOV 1.1
ObjectTemplate.insideFOV 1.1Increasing it will give you a wider view radius.
You can also apply the same effect to SoldierCamera.tweak
Just be sure to add ObjectTemplate.CVMInside 0 so it will automatically switch to what is set to 1.
Only issue is figuring out how to make the weapon set to a neutral Y axis position to have a GTA-style experience.
That probably can be done somehow using a RotationalBundle added to the soldier code with the setRotation settings.
As [R-DEV]rPoXoTauJIo said, try to experiment with the camera code to see what does what
Last edited by Arab on 2018-02-20 07:07, edited 22 times in total.
-
mft004
- Posts: 33
- Joined: 2017-12-14 17:37
Re: Back-looking cam angle change
Excellent many thanks TauJIo and Arab, I shall get to work 
-
Arab
- PR:BF2 Developer
- Posts: 2898
- Joined: 2012-05-18 03:37
Re: Back-looking cam angle change
Forgot one codemft004 wrote:Excellent many thanks TauJIo and Arab, I shall get to work![]()
ObjectTemplate.CVMInside 0
This is how it should look like:
https://www.youtube.com/watch?v=F-sK617ldRo
So assuming you want to replace the us_trk_logistics camera, just copy this part into the section and save. You can do this for all the vehicles, but just make sure to override the CVM code and any chase and nose stuff with the one below:
Code: Select all
ObjectTemplate.CVMChase 1
ObjectTemplate.CVMFrontChase 0
ObjectTemplate.CVMFlyBy 0
ObjectTemplate.followStiffness 0
ObjectTemplate.chaseDistance 20
ObjectTemplate.chaseAngle 90
ObjectTemplate.chaseOffset 0.5/0/0.1Code: Select all
ObjectTemplate.create Camera us_trk_logistics_Camera
ObjectTemplate.modifiedByUser "LJO"
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 0
rem -------------------------------------
ObjectTemplate.addTemplate S_SoldierCamera_RotationRpm
rem -------------------------------------
ObjectTemplate.setMinRotation -120/-25/0
ObjectTemplate.setMaxRotation 140/25/0
ObjectTemplate.setMaxSpeed 90/90/0
ObjectTemplate.setAcceleration 5000/5000/0
ObjectTemplate.setInputToYaw PIMouseLookX
ObjectTemplate.setInputToPitch PIMouseLookY
ObjectTemplate.regulatePitch 0.1/-0.1
ObjectTemplate.restoreRotationOnExit 1
ObjectTemplate.CVMChase 1
ObjectTemplate.CVMFrontChase 0
ObjectTemplate.CVMFlyBy 0
ObjectTemplate.cameraShakeStartSpeed 99999
ObjectTemplate.cameraShakeMaxSpeed 99999
ObjectTemplate.cameraShakeSensitivity 0.2
ObjectTemplate.followStiffness 0
ObjectTemplate.chaseDistance 20
ObjectTemplate.chaseAngle 90
ObjectTemplate.chaseOffset 0.5/0/0.1
ObjectTemplate.worldFOV 1.1
ObjectTemplate.insideFOV 1.1
ObjectTemplate.worldFOV 1.1
ObjectTemplate.insideFOV 1.1
ObjectTemplate.allowInsideDynamicLights 1
ObjectTemplate.allowInsideStaticSun 0
ObjectTemplate.insideStaticSunDirection 0/-1/0
ObjectTemplate.insideStaticSunColor 1/1/1
ObjectTemplate.insideStaticSunDamageColor 1/1/1
ObjectTemplate.insideDamageFrequency 3
ObjectTemplate.insideDamageThreshold 0.1
ObjectTemplate.insideStaticSunAmbientColor 0.7/0.7/0.7
ObjectTemplate.activeSafe Sound S_us_trk_logistics_Camera_RotationRpm
ObjectTemplate.modifiedByUser "Anders"Arab's Camera views - Battlefield SinglePlayer Forum
Last edited by Arab on 2018-03-11 03:00, edited 6 times in total.
-
mft004
- Posts: 33
- Joined: 2017-12-14 17:37
Re: Back-looking cam angle change
That video preview was just the sort of top-down view I was after, thanks for the extra code!
-
Arab
- PR:BF2 Developer
- Posts: 2898
- Joined: 2012-05-18 03:37
Re: Back-looking cam angle change
No worriesmft004 wrote:That video preview was just the sort of top-down view I was after, thanks for the extra code!

