Jump to content
Sign in to follow this  
NightIntruder

Need help with class Optics

Recommended Posts

I work on Amazonas class brazilian corvette with working turrets, including cargo crane.

The crane has camera attached to its longest arm and it shows where the arm is pointing out. Although, I need it to show a flight deck, so straight down view. I think there must be something wrong in config.cpp. Could someone help me with this, please?

 

Here is a movie that shows how the camera behave at this moment (first 45sec of the movie).

 

https://youtu.be/TQb-YEktywA

 

And below it's a piece of config.cpp code.

class CfgVehicles
{
	class Ship;
	class Zodiac;
	class BuoyBig;
	class INTShip1: Ship
	{
		class NewTurret;
		class Turrets;
		class viewpilot;
		class viewgunner;
		class AnimationSources;
		[...]
	};
	class int73_amazonas: INTShip1
	{
		[...]

		class Turrets: Turrets
		{
			class Main2Turret: NewTurret
			{
				[...]
				class ViewOptics
				{
					initAngleX = 0;
					minAngleX = -5;
					maxAngleX = 45;
					initAngleY = 0;
					minAngleY = -20;
					maxAngleY = 20;
					initFov = 0.6;
					minFov = 0.1;
					maxFov = 0.9;
				};
				class ViewGunner
				{
					initAngleX = 0;
					minAngleX = -85;
					maxAngleX = 85;
					initAngleY = 0;
					minAngleY = -140;
					maxAngleY = 140;
					initFov = 0.6;
					minFov = 0.5;
					maxFov = 0.7;
				};
			};
			class Cannon1Turret: Main2Turret
			{
				[...]
			};
			class Cannon2Turret: Main2Turret
			{
				[...]
			};
			class Crane2Turret: Main2Turret
			{
				gunnerName = "Cargo crane";
				[...]
				memoryPointGun = "gunner5";
				memoryPointGunnerOptics = "crane_camera";
				[...]
				radarType = 4;
				minElev = -15;
				maxElev = 75;
				initElev = 0;
				minTurn = -360;
				maxTurn = 360;
				initTurn = 0;
				gunnerOpticsModel = "\ca\wheeled\optika_stryker_driver";
				turretInfoType = "RscUnitInfo_AH64D_gunner";
				hasgunner = 1;
				class ViewGunner
				{
					initAngleX = 0;
					minAngleX = -85;
					maxAngleX = 85;
					initAngleY = 0;
					minAngleY = -140;
					maxAngleY = 140;
					initFov = 0.6;
					minFov = 0.5;
					maxFov = 0.7;
				};
				class ViewOptics
				{
					initAngleX = -90;
					minAngleX = -90;
					maxAngleX = -90;
					initAngleY = 0;
					minAngleY = 0;
					maxAngleY = 0;
					initFov = 0.6;
					minFov = 2.1;
					maxFov = 2.1;
				};
				class OpticsIn
				{
					class Wide
					{
						opticsDisplayName = "W";
						initAngleX = -90;
						minAngleX = -90;
						maxAngleX = -90;
						initAngleY = 0;
						minAngleY = 0;
						maxAngleY = 0;
						initFov = 1.3;
						minFov = 1.3;
						maxFov = 1.3;
						visionMode[] = {"Normal","NVG"};
						gunnerOpticsModel = "\ca\wheeled\optika_stryker_driver";
						
					};
					class Medium
					{
						opticsDisplayName = "M";
						initAngleX = -90;
						minAngleX = -90;
						maxAngleX = =90;
						initAngleY = 0;
						minAngleY = 0;
						maxAngleY = 0;
						initFov = 0.6;
						minFov = 0.6;
						maxFov = 0.6;
						visionMode[] = {"Normal","NVG"};
						gunnerOpticsModel = "\ca\wheeled\optika_stryker_driver";
						//gunnerOpticsModel = "\ca\air\optika_AH1Z.p3d";
					};
				};
			};
		};

Share this post


Link to post
Share on other sites

The angles for the optic are as far as i know only usable for free view - they get overwritten incase of gun optics.

The optic for a gun optic will always look where the gun is pointing from what i can tell, so you could try and add a fake/dummy weapon, and have gunEnd as a memorypoint at the camera location and gunBegin as a memorypoint below this point.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×