Jump to content
brezblock

[resolved] UAV Gunner Camera and MainGun orientation issue

Recommended Posts

Hi!

 

I could use some help with model / configuration please.

There is an issue with getting manually controlled (manualControl=1) rockets to hit point targeted by UAV Gunner Camera (Optics).

Model memory point configuration looks like this:

- MainGun (red)

- Optics (blue)

When I fire the rocket it follows the camera but the designation point seems like being calculated based on MainGun alignment and not by optics direction: so rocket hits the point far above the position I am aiming into.

unknown.png

 

One solution: I can align memory points to make this lines parallel, but in this case rocket is fling too low 😕

So I'd love to implement rocket elevating up at start and hitting target directly afterwards if this possible.

Have played around flightProfiles but it it does not seems to be supported option (TopDown attack does not seems what I want exactly).

Any ideas how to make this happen?

 

Thanks!

 

PS: my cfgVehicles.hpp:

class CfgVehicles {
	class LandVehicle;
	class StaticWeapon: LandVehicle {
		class NewTurret;
		class AnimationSources;
        class Turrets {
            class MainTurret: NewTurret {
                class ViewOptics;
            };
        };	
	};
	class StugnaP_System_F: StaticWeapon {
		author = "Brezerk";
		_generalMacro = "StugnaP_System_F";
		scope = 2;
		displayName = "Stugna-P System";
		class Armory
		{
			description = "Stugna-P is an anti-tank missile system developed by the Luch State Kiev Design Bureau (GosKKB Luch), one of the leading Ukrainian companies developing developers of guided missile weapons, as well as special military equipment.";
		};
		class Damage
		{
			tex[] = {};
			mat[] = {"a3\static_f_gamma\data\staticturret_01.rvmat", "a3\static_f_gamma\data\staticturret_01_damage.rvmat", "a3\static_f_gamma\data\staticturret_01_damage.rvmat"};
		};
		model = "ua_factions_gear\data\stugna-p\F_StugnaP_System_01.p3d";
		side = 1;
		faction = "BLU_F";
		crew = "B_UAV_AI";
		uavCameraGunnerDir = "look";
		uavCameraGunnerPos = "eye";
		gunnerUsesPilotView = 0;
		sensorPosition = "look";
        isUav = 1;
		hasDriver = 0;
		cargoCanControlUAV = 1;
		disableInventory = 1;
		transportSoldier = 0;
		hiddenSelectionsTextures[] = {"\ua_factions_gear\data\stugna-p\system_co.paa", "\ua_factions_gear\data\stugna-p\system_co.paa"};
		class Turrets: Turrets {
			class MainTurret: MainTurret {
				optics = 1;
				turretInfoType = "RcsOptics_StugnaP";
				gunnerOpticsModel = "\ua_factions_gear\data\stugna-p\F_StugnaP_Reticle_01.p3d";
				weapons[] = {"StugnaP_MissileLauncher"};
				magazines[] = {"1Rnd_StugnaP_P2C_missiles"};
				gunnerInAction="Disabled";
                gunnerAction="Disabled";
				gunnergetInAction = "";
				gunnergetOutAction = "";
				displayName = "";
				class ViewOptics: ViewOptics
				{
					initAngleX = 0;
					minAngleX = -30;
					maxAngleX = 30;
					initAngleY = 0;
					minAngleY = -100;
					maxAngleY = 100;
					initFov = 0.08333;
					minFov = 0.04167;
					maxFov = 0.08333;
					visionMode[] = {"Normal", "Ti"};
					thermalMode[] = {0, 1};
				};
				animationSourceBody = "MainTurret";
                animationSourceGun = "MainGun";
				gunBeg = "Usti hlavne";
				gunEnd = "Konec hlavne";
				maxHorizontalRotSpeed = 1.0;
                maxVerticalRotSpeed = 2.0;
                initElev = 0;
                minTurn = -81;
                maxTurn = 81;
                minElev = -7;
                maxElev = 27;
                initTurn = 0;
                dontCreateAI = 0;
                gunnerForceOptics = 1;
				cameraDir = "look";
				memoryPointCamera = "eye";
				memoryPointGunnerOptics = "eye";
			};
		};
	};

 

Share this post


Link to post
Share on other sites

And no ansver until now - did you check on discord? (but don't expect too much this is more complicated than shooting targets :), I have also problems with align shot direction but in my case projectiles are shot only direct form ship not from turret - but suprise this effect is only when AI controling and shooting turret :)

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

×