Turrets not moving / rotating properly

ArmA editing, missions, modeling, textures, terrains

Moderators: Lone Wolf, Snake Man

Post Reply
Snake Man
Commander-In-Chief
Posts: 9351
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Turrets not moving / rotating properly

Post by Snake Man » 2007-10-31 02:46:46

This is bit difficult to explain without showing it to you, but I'll try so bear with me.

I have problem with machine gun turrets, all of them work in basic level however some of the axis is broken. For example I can rotate the turret left to right without problems, however when I move mouse forward and backwards, the gun rotates like err turns on to its side, instead putting the tip of the barrel down or lifting it up, its weird.

First of all lets begin with simple by posting the selections and configs.

1.0 LOD selections
FrontLeftGun - the whole gun
FrontLeftGun_Turret - the whole gun
zasleh_front_left - muzzle flash proxy

Memory LOD points
axis_FrontLeftGun - two points horizontally where it would "tilt" up/down.
axis_FrontLeftGun_Turret - two points vertically where it would rotate left/right.
chamber_FrontLeft - point where the chamber would be
end_FrontLeft - tip of the barrel
FrontLeftGun - points of gunnerview_FrontLeft, chamber_FrontLeft and end_FrontLeft
FrontLeftGun_Turret - points of gunnerview_FrontLeft, axis_FrontLeftGun, chamber_FrontLeft and end_FrontLeft
gunnerview_FrontLeft - point where gunner view is
machinegun_FrontLeft - same as chamber_FrontLeft

Then the configs.

cfgSkeletons / skeletonBones

Code: Select all

"FrontLeftGun_Turret","","FrontLeftGun","FrontLeftGun_Turret"
cfgModels / class animations

Code: Select all

			// front left gun
			class FrontLeftGun_Turret
			{
				type="rotationY";
				source="FrontLeftGun_Turret";
				selection="FrontLeftGun_Turret";
				axis="axis_FrontLeftGun_Turret";
				animPeriod=0;
				memory=1;
				minValue="rad -360";
				maxValue="rad +360";
				angle0="rad -360";
				angle1="rad +360";
			};
			class FrontLeftGun
			{
				type="rotationX";
				source="FrontLeftGun";
				selection="FrontLeftGun";
				axis="axis_FrontLeftGun";
				animPeriod=0;
				memory=1;
				minValue="rad -360";
				maxValue="rad +360";
				angle0="rad -360";
				angle1="rad +360";
			};
And finally

cfgVehicles / heloname

Code: Select all

		class Turrets
		{
			// front left
			class FrontLeftGun_Turret : NewTurret
			{
				startEngine = 0;
				outGunnerMayFire = 1;
				body = "FrontLeftGun_Turret";
				gun = "FrontLeftGun";
				animationSourceBody = "FrontLeftGun_Turret";
				animationSourceGun = "FrontLeftGun";

				proxyIndex = 1;
				commanding = -1;
				gunnerName = "Front Left Gunner";
				memoryPointsGetInGunner = "pos gunner";
				memoryPointsGetInGunnerDir = "pos_gunner_dir";
				memoryPointGun = "machinegun_FrontLeft";
				memoryPointGunnerOptics = "gunnerview_FrontLeft";
				memoryPointGunnerOutOptics = "gunnerview_FrontLeft";

				gunBeg = "end_FrontLeft";
				gunEnd = "chamber_FrontLeft";

				selectionFireAnim = "zasleh_front_left";
				gunnerAction = "UH60_Gunner";
				gunnerInAction = "UH60_Gunner";
				primaryGunner = 1;
				
				weapons[]={"VTE_m197"};
				magazines[]={ "VTE_Mounted_750Rnd_20mm" };

				minElev = -80;
				maxElev = 25;
				initElev = -80;
				minTurn = -70;
				maxTurn = 70;
				initTurn = 0;

				class ViewOptics
				{
					initAngleX = 0;
					minAngleX = -30;
					maxAngleX = 30;
					initAngleY = 0;
					minAngleY = -100;
					maxAngleY = 100;
					initFov = 0.6;
					minFov = 0.6;
					maxFov = 0.5;
				};

				gunnerOpticsModel = "\ca\weapons\optika_empty";
				gunnerForceOptics = 0;
			};
I believe thats all the related info regarding this FrontLeftGun. Does anyone see any problems here on the posted info?

I know the info isn't complete, like you'd have to see how the Memory LOD points are actually positioned, but I'm hoping some smart guy can point out problem in my configs. If someone really wants to dig deep into this, they can find the MLOD model and related configs in this rar (8.6mb), it contains VTE_air.pbo and VTE_configs.pbo which contain the files, the model in question is "VTE_ach47a.p3d".
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

User avatar
Gnat
1st Lt
Posts: 120
Joined: 2004-01-07 08:46:56

Post by Gnat » 2007-10-31 10:00:53

Maybe this will help.
The model defined parts and memory points are fairly obvious.

All from the config;
class CfgSkeletons
{
class default
{
isDiscrete = 1;
skeletonInherit = "";
skeletonBones[] = {};
};
class GNT_FrigBones: default
{
isDiscrete=1;
skeletonInherit = "";
skeletonBones[]=
{
"Radar","",
"main1turret","",
"main1gun","main1turret",
"main2turret","",
"main2gun","main2turret",
"main3turret","",
"main3gun","main3turret",
"main4turret","",
"main4gun","main4turret",
};
.................
.................
class CfgModels
{
class Default
{
sectionsInherit="";
sections[] = {};
skeletonName = "";
};
class allvehicle : Default
{
sectionsInherit="";
sections[] = {};
skeletonName = "";
};
class Ship : allvehicle
{
sectionsInherit="";
sections[] = {"otocvez","otochlaven","radar","kompas","fuel","hodinova","minutova","mph","rpm","rpm2","main1turret","main1gun"};
skeletonName = "";
};
class Krivak : Ship
{
skeletonName = "GNT_FrigBones";
sectionsInherit="Ship";
sections[] = {"num1","num2","zodx1","zodx2","zodx3","zodx4","zodx5","zodx6","zodx7","zodx8","Radar","propeller","main1turret","main1gun","main2turret","main2gun","main3turret","main3gun","main4turret","main4gun"};
class Animations
{
class main1turret //the horizontal moving part of the turret
{
type="rotationY";
source="main1turret";
selection="main1turret";
axis="axis1turret";
animPeriod=0;
memory=1;
minValue="rad -360";
maxValue="rad +360";
angle0="rad -360";
angle1="rad +360";
};

class main1gun //the vertical moving part of the turret
{
type="rotationX";
source="main1gun";
selection="main1gun";
axis="axis1gun";
animPeriod=0;
memory=1;
minValue="rad -360";
maxValue="rad +360";
angle0="rad -360";
angle1="rad +360";
};

class main2turret : main1turret //the horizontal moving part of the turret
{
source="main2turret";
selection="main2turret";
axis="axis2turret";
};

class main2gun : main1gun //the vertical moving part of the turret
{
source="main2gun";
selection="main2gun";
axis="axis2gun";
};
class main3turret : main1turret //the horizontal moving part of the turret
{
source="main3turret";
selection="main3turret";
axis="axis3turret";
};

class main3gun : main1gun //the vertical moving part of the turret
{
source="main3gun";
selection="main3gun";
axis="axis3gun";
};

class main4turret : main1turret //the horizontal moving part of the turret
{
source="main4turret";
selection="main4turret";
axis="axis4turret";
};

class main4gun : main1gun //the vertical moving part of the turret
{
source="main4gun";
selection="main4gun";
axis="axis4gun";
};
class radar
{
type="rotation";
animPeriod=4;
source = "radar";
sourceAddress = "loop";
selection="Radar";
axis="osa radaru";
angle0=0;
angle1="rad +360";
};

};

};
.............
.............
class CfgVehicles
{
class All;
class AllVehicles : All {};
class Land : AllVehicles {};
class LandVehicle : Land {};
class Ship : AllVehicles {};
class GNTShip1 : Ship
{
class NewTurret;
class Turrets;
irScanRangeMin=500;
class viewpilot;
class viewgunner;
};

class GNTKrivak: GNTShip1
{
....................
....................
memoryPointMissile[] = {"spicerakety", "ustihlavne1"};
memoryPointMissileDir[] = {"konecrakety", "konechlavne1"};
class Turrets {
class MainTurret : NewTurret {
body = "main1turret";
gun = "main1gun";
animationSourceBody = "main1turret";
animationSourceGun = "main1gun";
gunnerAction = "BRDM2_Gunner";
gunnerName = "Missile Launcher";
gunnerOpticsModel = "\ca\wheeled\optika_BRDM";
proxyIndex = 1;
castGunnerShadow = 1;
ejectDeadGunner = 0;
proxyType="CPGunner";
minElev = -3;
maxElev = 35;
soundServo[]={"\ca\wheeled\Data\Sound\servo3",0.000178,0.900000};
initElev = 15;
minTurn = -155;
maxTurn = 155;
initTurn = 0;
weapons[] = {"R73Launcher"};
magazines[] = {"4Rnd_R73","4Rnd_R73"};
memoryPointGunnerOptics = "gunner1";
memoryPointGun = "konechlavne1";
showgunneroptics = 1;
startEngine = 0;
gunnercansee = 2+4+8+16+1;
outGunnerMayFire = 1;
inGunnerMayFire = 1;
irScanRangeMin = 1000;
irScanRangeMax = 5000;
irScanToEyeFactor = 4;
sensitivity=1;
hasgunner=true;
gunBeg = "ustihlavne1";
gunEnd = "konechlavne1";
gunnerForceOptics = 1;
commanding = -1;
primarygunner = 1;


class ViewPilot {
initAngleX = 15;
minAngleX = 25;
maxAngleX = 55;
initAngleY = 0;
minAngleY = -85;
maxAngleY = 85;
};

class ViewOptics {
initAngleX = 10;
minAngleX = 5;
maxAngleX = 45;
initAngleY = 0;
minAngleY = -100;
maxAngleY = 100;
initFov = 0.6;
minFov = 0.22;
maxFov = 0.9;
};

class ViewGunner {
initAngleX = 20;
minAngleX = 15;
maxAngleX = 60;
initAngleY = 0;
minAngleY = -85;
maxAngleY = 85;
initFov = 0.75;
minFov = 0.6;
maxFov = 0.9;
};
};

class Main2Turret : NewTurret {
body = "main2turret";
gun = "main2gun";
animationSourceBody = "main2turret";
animationSourceGun = "main2gun";
gunnerName = "Naval D30";
gunnerAction = "BRDM2_Gunner";
proxyIndex = 2;
castGunnerShadow = 1;
ejectDeadGunner = 0;
outGunnerMayFire = 1;
inGunnerMayFire = 1;
proxyType="CPGunner";
sensitivity=1;
minElev = -3;
maxElev = 35;
soundServo[]={"\ca\wheeled\Data\Sound\servo3",0.000178,0.900000};
initElev = 15;
minTurn = -155;
maxTurn = 155;
initTurn = 0;
gunBeg = "ustihlavne2";
gunEnd = "konechlavne2";
weapons[] = {"GNT_D30"};
magazines[] = {"30Rnd_122mmHE_D30", "30Rnd_122mmHE_D30"};
gunnerOpticsModel = "\ca\wheeled\optika_BRDM";
memoryPointGun = "konechlavne2";
memoryPointGunnerOptics = "gunner2";
showgunneroptics = 1;
gunnerForceOptics = 0;
startEngine = 0;
hasgunner=true;
commanding = -2;
primarygunner = 0;

class ViewPilot {
initAngleX = 15;
minAngleX = 25;
maxAngleX = 55;
initAngleY = 0;
minAngleY = -85;
maxAngleY = 85;
};

class ViewOptics {
initAngleX = 10;
minAngleX = 5;
maxAngleX = 45;
initAngleY = 0;
minAngleY = -100;
maxAngleY = 100;
initFov = 0.6;
minFov = 0.22;
maxFov = 0.9;
};

class ViewGunner {
initAngleX = 20;
minAngleX = 15;
maxAngleX = 60;
initAngleY = 0;
minAngleY = -85;
maxAngleY = 85;
initFov = 0.75;
minFov = 0.6;
maxFov = 0.9;
};
};


class CIWS1Turret : Main2Turret {
body = "main3turret";
gun = "main3gun";
animationSourceBody = "main3turret";
animationSourceGun = "main3gun";
proxyIndex = 3;
gunnerName = "CIWS 1";
minElev = -15;
maxElev = 75;
initElev = 5;
minTurn = 0;
maxTurn = 180;
initTurn = 90;
soundServo[] = {"", 0.01, 1.0};
gunBeg = "ustihlavne3";
gunEnd = "konechlavne3";
weapons[] = {AZP85};
magazines[] = {"2000Rnd_23mm_AZP85","2000Rnd_23mm_AZP85"};
gunnerOpticsModel = "\ca\wheeled\optika_BRDM";
memoryPointGun = "konechlavne3";
memoryPointGunnerOptics = "gunner3";
gunnerForceOptics = 1;
startEngine = 0;
hasgunner=true;
commanding = -3;
primarygunner = 0;
};
class CIWS2Turret : Main2Turret {
body = "main4turret";
gun = "main4gun";
animationSourceBody = "main4turret";
animationSourceGun = "main4gun";
proxyIndex = 4;
gunnerName = "CIWS 2";
minElev = -15;
maxElev = 75;
initElev = 5;
minTurn = 180;
maxTurn = 360;
initTurn = 270;
soundServo[] = {"", 0.01, 1.0};
gunBeg = "ustihlavne4";
gunEnd = "konechlavne4";
weapons[] = {M168};
magazines[] = {"2100Rnd_20mm_M168"};
gunnerOpticsModel = "\ca\wheeled\optika_BRDM";
memoryPointGun = "konechlavne4";
memoryPointGunnerOptics = "gunner4";
gunnerForceOptics = 1;
startEngine = 0;
hasgunner=true;
commanding = -4;
primarygunner = 0;
};

};
.............
.............

Snake Man
Commander-In-Chief
Posts: 9351
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Post by Snake Man » 2007-11-10 11:19:34

Thanks for posting Gnat, but looking and comparing your config to mine I cannot find any clues which might help.

One idea I had was that the BIS uh60mg and our working VTE UH1 and CH47 both has the guns pointing to 0 degrees or along the nose of the aircraft... So I turned one of the nonworking gun plus its memory points to point into 0 degrees but that did not help, in fact it turned the gun ingame the wrong way (0 degrees). So back to square one for me.

Dunno, maybe its needs fiddling with the memory points axis as the guns work otherwise ok, but kind of like inverted or something like that.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

Snake Man
Commander-In-Chief
Posts: 9351
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Post by Snake Man » 2008-01-16 16:29:59

Almost forgot to post the solution. Appears that when I was using CfgModels entry for the guns of type="rotationX"; it didn't work, I had to use type="rotationZ"; to make the turrets rotate properly. I wrote in the config comments: idea was that its not X axis but Z axis because its pointing the wrong direction.

Just wanted to provide solution for this topic :)
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests