Jump to content
Invincible120

Aircraft wheels and suspension

Recommended Posts

Hi all, i'm working on a UAV model. When i put the vehicle it's start to shaking.

How can i fix that issue?

 

Config:

Spoiler

 

config.cpp:

Quote


#define private 0
#define protected 1
#define public 2

#define WEST 1	
#define EAST 2
#define INDEPENDANT 3	

class DefaultEventhandlers;
class CfgPatches
{
	class uav_test
	{
		units[] = {"uav_anka_s"};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {"A3_Drones_F","A3_Weapons_F"};
	};
};

class SensorTemplatePassiveRadar;
class SensorTemplateAntiRadiation;
class SensorTemplateActiveRadar;
class SensorTemplateIR;
class SensorTemplateVisual;
class SensorTemplateMan;
class SensorTemplateLaser;
class SensorTemplateNV;
class SensorTemplateDataLink;
class DefaultVehicleSystemsDisplayManagerLeft
{
	class components;
};
class DefaultVehicleSystemsDisplayManagerRight
{
	class components;
};

class CfgVehicles
{
	class Plane;
	class UAV: Plane
	{
		class NewTurret;
		class ViewPilot;
		class ViewOptics;
		class AnimationSources;
		class Components;
	};

	class UAV_02_base_F;
	class UAV_02_dynamicLoadout_base_F: UAV_02_base_F
	{
		class NewTurret;
		class ViewPilot;
		class ViewOptics;
		class AnimationSources;
		class Components;
	};
	class uav_anka_s: UAV_02_dynamicLoadout_base_F
	{
		author="Invincible";
		displayName="TAI Anka-S";
		//editorSubcategory="EdSubcat_Drones";  map_anka_s_ca
		icon =  "anka_s\data\map_anka_s_ca.paa";
		picture= "anka_s\data\anka_base.paa";
		unitInfoType="RscOptics_AV_airplane_pilot";
		attenuationEffectType="OpenHeliAttenuation";
		scope=public;
		scopeCurator=public;
		side=WEST;
		faction="BLU_F";
		crew="B_UAV_AI";
		typicalCargo[]=
		{
			"B_UAV_AI"
		};
		accuracy=2;		
		class HitPoints
		{
			class HitHull
			{
				armor=3;
				explosionShielding=5;
				name="HitHull";
				passThrough=0.5;
				visual="Hit_Hull";
				radius=0.25;
				minimalHit=0.02;
				depends="Total";
				material=-1;
			};
			class HitEngine: HitHull
			{
				armor=1.5;
				explosionShielding=2;
				name="HitEngine";
				passThrough=0.5;
				visual="Hit_Engine";
				radius=0.25;
				minimalHit=0.1;
				depends="0";
			};
			class HitFuel: HitHull
			{
				armor=3;
				explosionShielding=4;
				name="HitFuel";
				passThrough=0.5;
				visual="Hit_Fuel";
				radius=0.30000001;
				minimalHit=0.1;
				depends="0";
			};
			class HitLAileron: HitHull
			{
				armor=1.5;
				explosionShielding=3;
				name="HitLAileron";
				passThrough=0.1;
				visual="Hit_AileronL";
				radius=0.2;
				minimalHit=0.1;
				depends="0";
			};
			class HitRAileron: HitLAileron
			{
				armor=1.5;
				explosionShielding=3;
				name="HitRAileron";
				passThrough=0.1;
				visual="Hit_AileronR";
				radius=0.2;
				minimalHit=0.1;
				depends="0";
			};
			class HitLCRudder: HitHull
			{
				armor=1.5;
				explosionShielding=3;
				name="HitLCRudder";
				passThrough=0.1;
				visual="Hit_RudderL";
				radius=0.15000001;
				minimalHit=0.1;
				depends="0";
			};
			class HitRRudder: HitLCRudder
			{
				armor=1.5;
				explosionShielding=3;
				name="HitRRudder";
				passThrough=0.1;
				visual="Hit_RudderR";
				radius=0.15000001;
				minimalHit=0.1;
				depends="0";
			};
			class HitLCElevator: HitHull
			{
				armor=1.5;
				explosionShielding=3;
				name="HitLCElevator";
				passThrough=0.1;
				visual="Hit_ElevatorL";
				radius=0.2;
				minimalHit=0.1;
				depends="0";
			};
			class HitRElevator: HitLCElevator
			{
				armor=1.5;
				explosionShielding=3;
				name="HitRElevator";
				passThrough=0.1;
				visual="Hit_ElevatorR";
				radius=0.2;
				minimalHit=0.1;
				depends="0";
			};
		};
		class Exhausts
		{
			class Exhaust_center
			{
				position="pos_Exhausts_start_center";
				direction="pos_Exhausts_end_center";
				effect="ExhaustsEffectHeliComHP";
			};
		};
		model = "anka_s\objects\uav_anka_s.p3d";
		maximumLoad=250;
		class TransportItems
		{
		};
		uavCameraDriverPos="PiP0_pos";
		uavCameraDriverDir="PiP0_dir";
		uavCameraGunnerPos="laserstart";
		uavCameraGunnerDir="commanderview";
		LODTurnedIn=-1;
		LODTurnedOut=-1;
		memoryPointLDust="DustLeft";
		memoryPointRDust="DustRight";
		memoryPointDriverOptics="PiP0_pos";
		driverOpticsModel="A3\drones_f\Weapons_F_Gamma\Reticle\UGV_01_Optics_Driver_F.p3d";
		driverForceOptics=1;
		getInRadius=0;
		class WingVortices
		{
		};
		class ViewPilot: ViewPilot
		{
			minFov=0.25;
			maxFov=1.25;
			initFov=0.75;
			initAngleX=0;
			minAngleX=-65;
			maxAngleX=85;
			initAngleY=0;
			minAngleY=-150;
			maxAngleY=150;
		};
		class Viewoptics: ViewOptics
		{
			initAngleX=0;
			minAngleX=0;
			maxAngleX=0;
			initAngleY=0;
			minAngleY=0;
			maxAngleY=0;
			minFov=0.25;
			maxFov=1.25;
			initFov=0.75;
			visionMode[]=
			{
				"Normal",
				"NVG",
				"Ti"
			};
			thermalMode[]={0,1};
		};
		class AnimationSources: AnimationSources
		{
			class Bombs
			{
				source="user";
				animPeriod=1e-006;
				initPhase=0;
			};
			class AT_missiles
			{
				source="user";
				animPeriod=0.99000001;
				initPhase=1;
			};
			class Damper_1_source
			{
				source="damper";
				wheel="wheel_1";
			};
			class Damper_2_source
			{
				source="damper";
				wheel="wheel_2";
			};
			class Damper_3_source
			{
				source="damper";
				wheel="wheel_3";
			};
			class Wheel_1_source
			{
				source="wheel";
				wheel="wheel_1";
			};
			class Wheel_2_source
			{
				source="wheel";
				wheel="wheel_2";
			};
			class Wheel_3_source
			{
				source="wheel";
				wheel="wheel_3";
			};
		};
		class camShakeGForce
		{
			distance=0;
			frequency=2;
			minSpeed=1;
			power=0.1;
		};
		
		startDuration = 10;
		acceleration = 500;
		driveOnComponent[] = {"wheel_1","wheel_2","wheel_3"};
		simulation = "airplaneX";
		maxSpeed=400;
		//landingAoa=0.1309;
		landingAoa = "5*3.1415/180";
		landingSpeed=95;
		stallSpeed=80;
		stallWarningTreshold=0.05;
		wheelSteeringSensitivity=1.3;
		angleOfIndicence = "1.5*3.1415/180";
		airBrake=1;
		airBrakeFrictionCoef=2;
		flaps=1;
		flapsFrictionCoef=0.2;
		gearsUpFrictionCoef=0.34999999;
		airFrictionCoefs0[]={0,0,0};
		airFrictionCoefs1[]={0.1,0.69999999,0.0049999999};
		airFrictionCoefs2[]={0.001,0.0074999998,5.9999998e-005};
		//angleOfIndicence=0;
		envelope[]={0,0.07,0.25999999,0.58999997,1.04,1.63,1.98,2.7,3.2,4.0500002,4.6799998,5.4899998,6.1900001,7.04,7.5300002,7.9000001,8.1999998,8.3999996,8.5,8.1999998,7};
		altNoForce=13000;
		altFullForce=2000;
		thrustCoef[]={1.36,1.25,1.14,1.04,0.94999999,0.86000001,0.77999997,0.69999999,0.61000001,0.30000001,0,0,0};
		aileronSensitivity=0.60000002;
		aileronCoef[]={0,0.12,0.46000001,0.64999998,0.75,0.81999999,0.88,0.92000002,0.94999999,0.97000003,0.99000001,1,1.01};
		elevatorSensitivity=0.69999999;
		elevatorCoef[]={0,0.2,0.69999999,0.47,0.38,0.31999999,0.28,0.25,0.22,0.19,0.17,0.15000001,0.13};
		rudderInfluence=0.93970001;
		rudderCoef[]={0,0.60000002,1.2,1.5,1.7,1.8,1.9,1.9,2,2,2,1.8,1.4};
		aileronControlsSensitivityCoef=3;
		elevatorControlsSensitivityCoef=3;
		rudderControlsSensitivityCoef=3;
		draconicForceXCoef=8;
		draconicForceYCoef=1.1;
		draconicForceZCoef=1;
		draconicTorqueXCoef[]={2,2.5,3.0999999,3.7,4.4000001,5.0999999,5.9000001,6.5,7,7.5,7.9000001,8.3000002,8.5};
		draconicTorqueYCoef[]={12,8,3,0.5,0,0,0,0,0,0,0,0,0};
		maxOmega=3000;
		engineMoi=0.1;
		dampingRateFullThrottle=0.029999999;
		dampingRateZeroThrottleClutchEngaged=0.029999999;
		dampingRateZeroThrottleClutchDisengaged=0.029999999;
		class Wheels
		{
			disableWheelsWhenDestroyed=1;
			class wheel_1
			{
				boneName="wheel_1";
				steering=1;
				side="left";
				center="wheel_1_center";
				boundary="wheel_1_rim";
				width=0.1448315;
				mass=10;
				MOI=0.10488081696125;
				dampingRate=0.1;
				dampingRateDamaged=1;
				dampingRateDestroyed=1000;
				maxBrakeTorque=0;
				maxHandBrakeTorque=0;
				suspTravelDirection[]={0,-1,0};
				suspForceAppPointOffset="wheel_1_center";
				tireForceAppPointOffset="wheel_1_center";
				maxCompression=1;
				maxDroop=1;
				sprungMass=500;
				springStrength=50000;
				springDamperRate=10000;
				longitudinalStiffnessPerUnitGravity=1000;
				latStiffX=25;
				latStiffY=180;
				frictionVsSlipGraph[]=
				{
					{0,1},
					{0.5,1},
					{1,1}
				};
			};
			class wheel_2: wheel_1
			{
				boneName="wheel_2";
				steering=0;
				center="wheel_2_center";
				boundary="wheel_2_rim";
				suspForceAppPointOffset="wheel_2_center";
				tireForceAppPointOffset="wheel_2_center";
				maxCompression=0.03490659;
				maxDroop=0.03490659;
				sprungMass=1250;
				springStrength=125000;
				springDamperRate=25000;
				maxBrakeTorque=500;
			};
			class wheel_3: wheel_2
			{
				boneName="wheel_3";
				side="right";
				center="wheel_3_center";
				boundary="wheel_3_rim";
				suspForceAppPointOffset="wheel_3_center";
				tireForceAppPointOffset="wheel_3_center";
			};
		};
		killFriendlyExpCoef=0.1;
		driverCompartments="Compartment3";
		cargoCompartments[]=
		{
			"Compartment2"
		};
		class Damage
		{
			tex[]={};
			mat[]=
			{
				"A3\Drones_F\Air_F_Gamma\UAV_02\Data\UAV_02.rvmat",
				"A3\Drones_F\Air_F_Gamma\UAV_02\Data\UAV_02_damage.rvmat",
				"A3\Drones_F\Air_F_Gamma\UAV_02\Data\UAV_02_destruct.rvmat"
			};
		};
		hiddenSelections[]=
		{
			"camo1"
		};
		hiddenSelectionsTextures[]=
		{
			"A3\Drones_F\Air_F_Gamma\UAV_02\Data\UAV_02_CO.paa"
		};
		weapons[]=
		{
			
		};
		magazines[]=
		{
			
		};
		radarTargetSize=0.5;
		visualTargetSize=0.69999999;
		irTargetSize=0.5;
		lockDetectionSystem=0;
		incomingMissileDetectionSystem=0;
		laserscanner=1;
		showAllTargets=4;
		reportRemoteTargets=1;
		reportOwnPosition=1;
		class Components: Components
		{
			class SensorsManagerComponent
			{
				class Components
				{
					class IRSensorComponent: SensorTemplateIR
					{
						class AirTarget
						{
							minRange=500;
							maxRange=3000;
							objectDistanceLimitCoef=-1;
							viewDistanceLimitCoef=1;
						};
						class GroundTarget
						{
							minRange=500;
							maxRange=2500;
							objectDistanceLimitCoef=1;
							viewDistanceLimitCoef=1;
						};
						maxTrackableSpeed=50;
						angleRangeHorizontal=51;
						angleRangeVertical=37;
						animDirection="maingun";
						aimDown=-0.5;
					};
					class VisualSensorComponent: SensorTemplateVisual
					{
						class AirTarget
						{
							minRange=500;
							maxRange=3000;
							objectDistanceLimitCoef=-1;
							viewDistanceLimitCoef=1;
						};
						class GroundTarget
						{
							minRange=500;
							maxRange=2500;
							objectDistanceLimitCoef=1;
							viewDistanceLimitCoef=1;
						};
						maxTrackableSpeed=50;
						angleRangeHorizontal=51;
						angleRangeVertical=37;
						animDirection="maingun";
						aimDown=-0.5;
					};
					class PassiveRadarSensorComponent: SensorTemplatePassiveRadar
					{
						class AirTarget
						{
							minRange=6000;
							maxRange=6000;
							objectDistanceLimitCoef=-1;
							viewDistanceLimitCoef=-1;
						};
						class GroundTarget
						{
							minRange=6000;
							maxRange=6000;
							objectDistanceLimitCoef=-1;
							viewDistanceLimitCoef=-1;
						};
					};
					class LaserSensorComponent: SensorTemplateLaser
					{
					};
					class NVSensorComponent: SensorTemplateNV
					{
					};
				};
			};
			class VehicleSystemsDisplayManagerComponentLeft: DefaultVehicleSystemsDisplayManagerLeft
			{
				class components
				{
					class EmptyDisplay
					{
						componentType="EmptyDisplayComponent";
					};
					class MinimapDisplay
					{
						componentType="MinimapDisplayComponent";
						resource="RscCustomInfoMiniMap";
					};
					class UAVDisplay
					{
						componentType="UAVFeedDisplayComponent";
					};
					class SensorDisplay
					{
						componentType="SensorsDisplayComponent";
						range[]={4000,2000,1000,8000};
						resource="RscCustomInfoSensors";
					};
				};
			};
			class VehicleSystemsDisplayManagerComponentRight: DefaultVehicleSystemsDisplayManagerRight
			{
				defaultDisplay="SensorDisplay";
				class components
				{
					class EmptyDisplay
					{
						componentType="EmptyDisplayComponent";
					};
					class MinimapDisplay
					{
						componentType="MinimapDisplayComponent";
						resource="RscCustomInfoMiniMap";
					};
					class UAVDisplay
					{
						componentType="UAVFeedDisplayComponent";
					};
					class SensorDisplay
					{
						componentType="SensorsDisplayComponent";
						range[]={4000,2000,1000,8000};
						resource="RscCustomInfoSensors";
					};
				};
			};
			class TransportPylonsComponent
			{
				uiPicture = "anka_s\data\anka_base_eden.paa";

				class Pylons
				{
					class Pylons1
					{
						hardpoints[]	= {"DEVAS_W_MAM_L"};
						attachment		= "DEVAS_2Rnd_MAM_L_YIPE_Mag";
						priority		= 1;
						maxweight		= 100;						
						UIposition[]	= {0.45,0.07};
					};
					
					class Pylons2
					{
						hardpoints[]	= {"DEVAS_W_MAM_L"};
						priority		= 1;
						attachment		= "DEVAS_2Rnd_MAM_L_YIPE_Mag";
						maxweight		= 100;
						UIposition[]	= {0.35,0.15};
						mirroredMissilePos = 1;
					};
				};	        

				class Presets
				{
					class Empty
					{
						displayName = "Empty";
						attachment[] = {};
					};
					class Default
					{
						displayName = "HE/BF";
						attachment[] =
						{
							"DEVAS_2Rnd_MAM_L_YIPE_Mag",
							"DEVAS_2Rnd_MAM_L_YIPE_Mag"
						};
					};
					class Tandem
					{
						displayName = "Tandem";
						attachment[] =
						{
							"DEVAS_2Rnd_MAM_L_RZKET_Mag",
							"DEVAS_2Rnd_MAM_L_RZKET_Mag"
						};
					};
					class Thermobaric
					{
						displayName = "Thermobaric";
						attachment[] =
						{
							"DEVAS_2Rnd_MAM_L_TB_Mag",
							"DEVAS_2Rnd_MAM_L_TB_Mag"
						};
					};
				};
			};
		};
		class Turrets
		{
			class MainTurret: NewTurret
			{
				isCopilot=0;
				minElev=-85;
				maxElev=10;
				initElev=0;
				minTurn=-360;
				maxTurn=360;
				initTurn=0;
				maxHorizontalRotSpeed=10;
				maxVerticalRotSpeed=10;
				outGunnerMayFire=1;
				inGunnerMayFire=1;
				commanding=-1;
				body="mainturret";
				gun="maingun";
				animationSourceBody="mainturret";
				animationSourceGun="maingun";
				memoryPointGun="commanderview";
				memoryPointGunnerOptics="laserstart";
				gunAxis="maingun_axis";
				gunBeg="commanderview";
				gunEnd="laserstart";
				gunnerOpticsModel="A3\drones_f\Weapons_F_Gamma\Reticle\UGV_01_Optics_Gunner_F.p3d";
				gunnerForceOptics=1;
				turretInfoType="RscOptics_UAV_gunner";
				stabilizedInAxes=3;
				enableManualFire=0;
				showAllTargets=4;
				weapons[]=
				{
					"Laserdesignator_mounted",
					"DEVAS_MAM_L_Weap"

				};
				magazines[]=
				{
					"Laserbatteries",
					"DEVAS_2Rnd_MAM_L_YIPE_Mag"
				};
				soundServo[]=
				{
					"A3\Sounds_F\vehicles\air\noises\servo_drone_turret_2",
					0.056234129,
					1,
					10
				};
				soundServoVertical[]=
				{
					"A3\Sounds_F\vehicles\air\noises\servo_drone_turret_2",
					0.056234129,
					1,
					10
				};
				GunnerCompartments="Compartment1";
				startEngine=0;
				LODTurnedIn=-1;
				LODTurnedOut=-1;
				class OpticsIn
				{
					class Wide
					{
						opticsDisplayName="W";
						initAngleX=0;
						minAngleX=-30;
						maxAngleX=30;
						initAngleY=0;
						minAngleY=-100;
						maxAngleY=100;
						initFov=0.5;
						minFov=0.5;
						maxFov=0.5;
						directionStabilized=1;
						visionMode[]=
						{
							"Normal",
							"NVG",
							"Ti"
						};
						thermalMode[]={0,1};
						gunnerOpticsModel="A3\drones_f\Weapons_F_Gamma\Reticle\UAV_Optics_Gunner_wide_F.p3d";
					};
					class Medium: Wide
					{
						opticsDisplayName="M";
						initFov=0.1;
						minFov=0.1;
						maxFov=0.1;
						gunnerOpticsModel="A3\drones_f\Weapons_F_Gamma\Reticle\UAV_Optics_Gunner_medium_F.p3d";
					};
					class Narrow: Wide
					{
						opticsDisplayName="N";
						initFov=0.0286;
						minFov=0.0286;
						maxFov=0.0286;
						gunnerOpticsModel="A3\drones_f\Weapons_F_Gamma\Reticle\UAV_Optics_Gunner_narrow_F.p3d";
					};
				};
				class OpticsOut
				{
					class Monocular
					{
						initAngleX=0;
						minAngleX=-30;
						maxAngleX=30;
						initAngleY=0;
						minAngleY=-100;
						maxAngleY=100;
						initFov=1.1;
						minFov=0.133;
						maxFov=1.1;
						visionMode[]=
						{
							"Normal",
							"NVG"
						};
						gunnerOpticsModel="";
						gunnerOpticsEffect[]={};
					};
				};
				class Components
				{
					class VehicleSystemsDisplayManagerComponentLeft: DefaultVehicleSystemsDisplayManagerLeft
					{
						class components
						{
							class EmptyDisplay
							{
								componentType="EmptyDisplayComponent";
							};
							class MinimapDisplay
							{
								componentType="MinimapDisplayComponent";
								resource="RscCustomInfoMiniMap";
							};
							class UAVDisplay
							{
								componentType="UAVFeedDisplayComponent";
							};
							class SensorDisplay
							{
								componentType="SensorsDisplayComponent";
								range[]={4000,2000,1000,8000};
								resource="RscCustomInfoSensors";
							};
						};
					};
					class VehicleSystemsDisplayManagerComponentRight: DefaultVehicleSystemsDisplayManagerRight
					{
						defaultDisplay="SensorDisplay";
						class components
						{
							class EmptyDisplay
							{
								componentType="EmptyDisplayComponent";
							};
							class MinimapDisplay
							{
								componentType="MinimapDisplayComponent";
								resource="RscCustomInfoMiniMap";
							};
							class UAVDisplay
							{
								componentType="UAVFeedDisplayComponent";
							};
							class SensorDisplay
							{
								componentType="SensorsDisplayComponent";
								range[]={4000,2000,1000,8000};
								resource="RscCustomInfoSensors";
							};
						};
					};					
				};
			};
		};
	};
};

 

model.cfg

Quote


class CfgSkeletons
{
    class Skeleton
    {
        isDiscrete=0;
        skeletonInherit="";
        skeletonBones[]=
		{
			"rudder_1_1", "",
			"rudder_2_1", "", 
			"flap_1_1", "", 
			"flap_2_1", "", 
			"elevator", "", 
			"aileron_1_1", "", 
			"aileron_2_1", "", 
			"mainturret", "", 
			"maingun", "mainturret", 
			"commanderview", "maingun", 
			"laserstart", "maingun",
			"damagehide", "", 
			"propeller", "damagehide", 
			"propellerblurred", "propeller", 
			"propellerstatic", "propeller",
			"wheel_1_strut", "damagehide",
			"wheel_1_steering", "wheel_1_strut",				
			"wheel_1_damper", "wheel_1_steering", 
			"wheel_1", "wheel_1_damper", 
			"wheel_2_strut", "damagehide",
			"wheel_2_support", "damagehide",
			"wheel_2", "wheel_2_strut",
			"wheel_2_damper", "wheel_2_strut", 
			"wheel_2", "wheel_2_damper", 
			"wheel_3_strut", "damagehide",
			"wheel_3_support", "damagehide",
			"wheel_3", "wheel_3_strut",
			"wheel_3_damper", "wheel_3_strut", 
			"wheel_3", "wheel_3_damper", 
			"wheel_1", "damagehide", 
			"wheel_2", "damagehide", 
			"wheel_3", "damagehide", 
			"wheel_1_damper", "damagehide", 
			"door_f_1_1", "damagehide", 
			"door_f_1_2", "damagehide", 
			"door_b_1_1", "damagehide", 
			"door_b_1_2", "damagehide", 
			"hideweapons", "damagehide", 
			"missilea", "hideweapons", 
			"missilea1", "hideweapons", 
			"missilea2", "hideweapons", 
			"missilea3", "hideweapons", 
			"missileb", "hideweapons", 
			"missileb1", "hideweapons", 
			"missileb2", "hideweapons", 
			"missileb3", "hideweapons", 
			"positionlights_hide", "",
			"wheel_1", "wheel_1_land",
			"wheel_2", "wheel_2_land",
			"wheel_3", "wheel_3_land"
		};
    };
};
class CfgModels
{
    class uav_anka_s
    {
        htMin=60;
        htMax=1800;
        afMax=200;
        mfMax=100;
        mFact=0;
        tBody=0;
        skeletonName="Skeleton";
        sectionsInherit="";
        sections[]={"camo1", "zbytek", "hit_elevatorl", "hit_elevatorr", "hit_aileronl", "hit_aileronr", "hit_rudderl", "hit_rudderr", "hit_engine", "hit_fuel", "hit_hull"};
        class Animations
        {
            class frontgeardamper
            {
                type="translation";
                source="damper_1_source";
                selection="wheel_1_damper";
                sourceAddress="clamp";
				axis="wheel_1_damper_axis";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=1;
                offset0=-1;
                offset1=1;
            };
			class maingear_2_suspension
            {
                type="rotation";
                source="damper_2_source";
                selection="wheel_2_strut";
                sourceAddress="clamp";
				axis="wheel_2_damper_axis";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=1;
                angle0=-0.03490659;
                angle1=0.03490659;
            };
            class maingear_3_suspension
            {
                type="rotation";
                source="damper_3_source";
                selection="wheel_3_strut";
                sourceAddress="clamp";
				axis="wheel_3_damper_axis";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=1;
                angle0=0.03490659;
                angle1=-0.03490659;
            };
			class hideweapons
            {
                type="hide";
                source="hideweapons";
                selection="hideweapons";
                sourceAddress="clamp";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=0;
                hideValue=0.5;
                unHideValue=-1;
            };
			class maingear_2_support
            {
                type="rotation";
                source="gear";
                selection="wheel_2_support";
                sourceAddress="clamp";
				axis="wheel_2_support_axis";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=0;
                angle0=0;
                angle1="rad -90";
            };
            class maingear_3_support
            {
                type="rotation";
                source="gear";
                selection="wheel_3_support";
                sourceAddress="clamp";
				axis="wheel_3_support_axis";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=0;
                angle0=0;
                angle1="rad 90";
            };
			class maingear_2
            {
                type="rotation";
                source="gear";
                selection="wheel_2_strut";
                sourceAddress="clamp";
				axis="wheel_2_strut_axis";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=0;
                angle0=0;
                angle1="rad 90";
            };
            class maingear_3
            {
                type="rotation";
                source="gear";
                selection="wheel_3_strut";
                sourceAddress="clamp";
				axis="wheel_3_strut_axis";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=0;
                angle0=0;
                angle1="rad -90";
            };
			class propeller
            {
                type="rotation";
                source="rotor";
                selection="propeller";
                sourceAddress="clamp";
				axis="propeller_axis";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=0;
                angle0=0;
                angle1=2.094395;
            };
            class propellerstatic
            {
                type="hide";
                source="rpm";
                selection="propellerstatic";
                sourceAddress="clamp";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=0;
                hideValue=0.5;
                unHideValue=-1;
            };
            class propellerblurred
            {
                type="hide";
                source="rpm";
                selection="propellerblurred";
                sourceAddress="clamp";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=0;
                hideValue=0;
                unHideValue=0.5;
            };
            class mainturret
            {
                type="rotation";
                source="mainturret";
                selection="mainturret";
                sourceAddress="clamp";
				axis="mainturret_axis";
                minPhase="rad -360";
                maxPhase="rad 360";
				minValue="rad -360";
                maxValue="rad 360";
                memory=1;
                angle0="rad -360";
                angle1="rad 360";
            };
            class maingun
            {
                type="rotation";
                source="maingun";
                selection="maingun";
                sourceAddress="clamp";
				axis="maingun_axis";
                minPhase="rad -85";
                maxPhase="rad 10";
                minValue="rad -85";
                maxValue="rad 10";
                memory=1;
                angle0="rad 85";
                angle1="rad -10";
            };
            class flap_1_1
            {
                type="rotation";
                source="flap";
                selection="flap_1_1";
                sourceAddress="clamp";
				axis="flap_1_1_axis";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=0;
                angle0=0;
                angle1=-0.4991642;
            };
            class flap_2_1
            {
                type="rotation";
                source="flap";
                selection="flap_2_1";
                sourceAddress="clamp";
				axis="flap_2_1_axis";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=0;
                angle0=0;
                angle1=0.2495821;
            };
            class aileron_1_1
            {
                type="rotation";
                source="aileronleftdamaged";
                selection="aileron_1_1";
                sourceAddress="clamp";
				axis="aileron_1_1_axis";
                minPhase=-1.4;
                maxPhase=1.4;
                minValue=-1.4;
                maxValue=1.4;
                memory=0;
                angle0=-0.4363323;
                angle1=0.4363323;
            };
            class aileron_2_1
            {
                type="rotation";
                source="aileronrightdamaged";
                selection="aileron_2_1";
                sourceAddress="clamp";
				axis="aileron_2_1_axis";
                minPhase=-1.4;
                maxPhase=1.4;
                minValue=-1.4;
                maxValue=1.4;
                memory=0;
                angle0=-0.4363323;
                angle1=0.4363323;
            };
            class rudder_1_1
            {
                type="rotation";
                source="rudderleftcenterdamaged";
                selection="rudder_1_1";
                sourceAddress="clamp";
				axis="rudder_1_1_axis";
                minPhase=-1;
                maxPhase=1;
                minValue=-1;
                maxValue=1;
                memory=0;
                angle0=0.2617994;
                angle1=-0.2617994;
            };
            class rudder_2_1
            {
                type="rotation";
                source="rudderrightdamaged";
                selection="rudder_2_1";
                sourceAddress="clamp";
				axis="rudder_2_1_axis";
                minPhase=-1;
                maxPhase=1;
                minValue=-1;
                maxValue=1;
                memory=0;
                angle0=0.2617994;
                angle1=-0.2617994;
            };
            class frontgear_1
            {
                type="rotation";
                source="gear";
                selection="wheel_1_strut";
                sourceAddress="clamp";
				axis="wheel_1_strut_axis";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=0;
                angle0=0;
                angle1=1.797689;
            };
            class frontgear_1_door_l
            {
                type="rotation";
                source="gear";
                selection="door_f_1_1";
                sourceAddress="clamp";
				axis="door_f_1_1_axis";
                minPhase=0.8;
                maxPhase=1;
                minValue=0.8;
                maxValue=1;
                memory=0;
                angle0=0;
                angle1=1.570796;
            };
            class frontgear_1_door_r
            {
                type="rotation";
                source="gear";
                selection="door_f_1_2";
                sourceAddress="clamp";
				axis="door_f_1_2_axis";
                minPhase=0.8;
                maxPhase=1;
                minValue=0.8;
                maxValue=1;
                memory=0;
                angle0=0;
                angle1=-1.570796;
            };
            class backgear_1_door_l
            {
                type="rotation";
                source="gear";
                selection="door_b_1_1";
                sourceAddress="clamp";
				axis="door_b_1_1_axis";
                minPhase=0.8;
                maxPhase=1;
                minValue=0.8;
                maxValue=1;
                memory=0;
                angle0=0;
                angle1="rad -90";
            };
            class backgear_1_door_r
            {
                type="rotation";
                source="gear";
                selection="door_b_1_2";
                sourceAddress="clamp";
				axis="door_b_1_2_axis";
                minPhase=0.8;
                maxPhase=1;
                minValue=0.8;
                maxValue=1;
                memory=0;
                angle0=0;
                angle1="rad 90";
            };
            class frontgearsteering
            {
                type="rotation";
                source="rudder";
                selection="wheel_1_steering";
                sourceAddress="clamp";
				axis="wheel_1_steering_axis";
                minPhase=-8;
                maxPhase=8;
                minValue=-8;
                maxValue=8;
                memory=0;
                angle0=-1.047198;
                angle1=1.047198;
            };
            class wheel_1
            {
                type="rotationx";
                source="wheel";
                selection="wheel_1";
                sourceAddress="loop";
				axis="wheel_1_center";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=0;
                angle0=0;
                angle1=-3.141593;
            };
            class wheel_2
            {
                type="rotationx";
                source="wheel";
                selection="wheel_2";
                sourceAddress="loop";
				axis="wheel_2_center";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=0;
                angle0=0;
                angle1=-2.792527;
            };
            class wheel_3
            {
                type="rotationx";
                source="wheel";
                selection="wheel_3";
                sourceAddress="loop";
				axis="wheel_3_center";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=0;
                angle0=0;
                angle1=-2.792527;
            };
            class damagehide
            {
                type="hide";
                source="damage";
                selection="damagehide";
                sourceAddress="clamp";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=0;
                hideValue=1;
                unHideValue=-1;
            };
            class positionlights
            {
                type="hide";
                source="collisionlights";
                selection="positionlights_hide";
                sourceAddress="clamp";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=0;
                hideValue=0;
                unHideValue=0.5;
            };
        };
    };
};

 


 

Resolution LOD:

1) Wheels:

https://prntscr.com/weqc21

2) Dampers:

https://prntscr.com/weqc7a

Geo LOD:

1) Wheels:

https://prntscr.com/weqctq

2) Front view:

https://prntscr.com/weqcxn

3) Left view:

https://prntscr.com/weqd02

LandContact:

https://prntscr.com/weqch8

1) Left:

https://prntscr.com/weqckj

2) Front:

https://prntscr.com/weqcq4

Memory Points:

1) Front:

https://prntscr.com/weqcee

2) Left:

https://prntscr.com/weqcbm

 

 

  • Sad 1

Share this post


Link to post
Share on other sites

Update:

I fixed shaking issue and now UAV is perfectly touching to ground.

Here is what i did to solve:

- I edited my model.cfg suspension values and now it's matching with maxCompression and maxDroop in the config.cpp. This solved shaking problem. But vehicle was staying a little bit up from ground. To solve that:

- I moved up my landcontact and wheel_x_rim points (to be sure i moved them 0.07 which is the value in the model.cfg suspension offset) here is the final stand: https://prnt.sc/wkaiuu

- I m using translation instead of rotation for suspension animation. (But i m planning to use rotation in the future...)

- Last state of my class Wheels: 

Spoiler
Quote

        class Wheels
        {
            disableWheelsWhenDestroyed=1;
            class wheel_1
            {
                boneName="wheel_1";
                steering=1;
                side="left";
                center="wheel_1_center";
                boundary="wheel_1_rim";
                width=0.1448315;
                mass=10;
                MOI=0.10488081696125;
                dampingRate=0.1;
                dampingRateDamaged=1;
                dampingRateDestroyed=1000;
                maxBrakeTorque=0;
                maxHandBrakeTorque=0;
                suspTravelDirection[]={0,-1,0};
                suspForceAppPointOffset="wheel_1_axis";
                tireForceAppPointOffset="wheel_1_axis";
                maxCompression=0.07;
                maxDroop=0.07;
                sprungMass=1000;
                springStrength=9000;
                springDamperRate=4800;
                longitudinalStiffnessPerUnitGravity=1000;
                latStiffX=2;
                latStiffY=18;
                frictionVsSlipGraph[]=
                {
                    {0,1},
                    {0.5,1},
                    {1,1}
                };
            };
            class wheel_2: wheel_1
            {
                boneName="wheel_2";
                steering=0;
                center="wheel_2_center";
                boundary="wheel_2_rim";
                sprungMass=1500;
                springStrength=13500;
                springDamperRate=7200;
                suspForceAppPointOffset="wheel_2_axis";
                tireForceAppPointOffset="wheel_2_axis";
                maxBrakeTorque=500;
            };
            class wheel_3: wheel_2
            {
                boneName="wheel_3";
                side="right";
                center="wheel_3_center";
                boundary="wheel_3_rim";
                suspForceAppPointOffset="wheel_3_axis";
                tireForceAppPointOffset="wheel_3_axis";
            };
        };

 

But now, i have a new problem: I can bring the gear up while the UAV is still on the ground. Any ideas?

  • Like 1

Share this post


Link to post
Share on other sites

Hi all, after months, I remade this UAV for the visual purposes but I changed many things about the PhysX as well. But there is still an issue with my PhysX configuration. Here is a video of the current issue: 

the PhysX setup:

Spoiler

		class wheels
		{
			class wheel_1
			{
				boneName="wheel_1"; 
				steering=1; 
				side="left"; 
				center="wheel_1_center"; 
				boundary="wheel_1_rim"; 
				width=0.16; 
				mass=10; 
				MOI=0.839844128; 
				dampingRate=0.4; 
				dampingRateDamaged=1; 
				dampingRateDestroyed=1000; 
				maxBrakeTorque=0; 
				maxHandBrakeTorque=0; 
				suspTravelDirection[]={0, -1, 0}; 
				suspForceAppPointOffset="wheel_1_center"; 
				tireForceAppPointOffset="wheel_1_center"; 
				maxCompression= 0.1; 
				maxDroop= 0.1; 
				sprungMass=300; 
				springStrength=30000; 
				springDamperRate=6000; 
				longitudinalStiffnessPerUnitGravity=400; 
				latStiffX=2; 
				latStiffY= 18;
				frictionVsSlipGraph[]=
				{
					{0,0.40000001},
					{0.2,0.69999999},
					{0.5,0.5}
				};				
			};
			class wheel_2: wheel_1
			{
				steering= 0;
				boneName= "wheel_2";
				center= "wheel_2_center";
				boundary= "wheel_2_rim";
				mass= 10;
				MOI=0.839844128;
				width= 0.16;
				maxBrakeTorque= 500;
				maxCompression= 0.1;
				maxDroop= 0.1;
				sprungMass= 600;
				springStrength= 60000;
				springDamperRate= 12000;
				longitudinalStiffnessPerUnitGravity= 400;
				suspForceAppPointOffset= "wheel_2_center";
				tireForceAppPointOffset= "wheel_2_center";
			};
			class wheel_3: wheel_2
			{
				boneName= "wheel_3";
				side= "right";
				center= "wheel_3_center";
				boundary= "wheel_3_rim";
				suspForceAppPointOffset= "wheel_3_center";
				tireForceAppPointOffset= "wheel_3_center";
			};
		};

 

the model.cfg:

Spoiler

class CfgSkeletons
{
    class Skeleton
    {
        isDiscrete=0;
        skeletonInherit="";
        skeletonBones[]=
        {
        };
    };
	class uav_anka_s: Skeleton
	{
		skeletonBones[]=
		{
			"rudder_1_1", "",
            "rudder_2_1", "", 
            "flap_1_1", "", 
            "flap_2_1", "", 
            "elevator_1_1", "", 
			"elevator_2_1", "",
            "aileron_1_1", "", 
            "aileron_2_1", "", 
            "mainturret", "", 
            "maingun", "mainturret", 
            "commanderview", "maingun", 
            "laserstart", "maingun",
            "damagehide", "", 
            "propeller", "damagehide", 
            "propellerblurred", "propeller", 
            "propellerstatic", "propeller",
            "wheel_1_strut", "damagehide",
            "wheel_1_steering", "wheel_1_strut",                
            "gear_1_damper", "wheel_1_steering", 
            "wheel_1", "gear_1_damper", 
            "wheel_2_support", "damagehide",
			"gear_2_damper", "damagehide",
            "wheel_2_strut", "gear_2_damper", 
			"wheel_2", "wheel_2_strut",
		    "wheel_3_support", "damagehide",
			"gear_3_damper", "damagehide",
            "wheel_3_strut", "gear_3_damper", 
            "wheel_3", "wheel_3_strut",			
            "wheel_1", "damagehide", 
            "wheel_2", "damagehide", 
            "wheel_3", "damagehide", 
            "door_f_1_1", "damagehide", 
            "door_f_1_2", "damagehide", 
            "door_b_1_1", "damagehide", 
            "door_b_1_2", "damagehide", 
            "hideweapons", "damagehide", 
            "missilea", "hideweapons", 
            "missilea1", "hideweapons", 
            "missilea2", "hideweapons", 
            "missilea3", "hideweapons", 
            "missileb", "hideweapons", 
            "missileb1", "hideweapons", 
            "missileb2", "hideweapons", 
            "missileb3", "hideweapons", 
            "positionlights_hide", "",
			"gear_1_damper_land", "gear_1_damper",
			"gear_2_damper_land", "gear_2_damper",
			"gear_3_damper_land", "gear_3_damper"
		};
	};
};
class CfgModels
{
    class uav_anka_s
    {
        htMin=60;
        htMax=1800;
        afMax=200;
        mfMax=100;
        mFact=0;
        tBody=0;
        skeletonName="uav_anka_s";
        sectionsInherit="";
        sections[]={"camo1", "zbytek", "hit_elevatorl", "hit_elevatorr", "hit_aileronl", "hit_aileronr", "hit_rudderl", "hit_rudderr", "hit_engine", "hit_fuel", "hit_hull"};
        class Animations
        {
			class frontgeardamper
            {
                type="translation";
                source="damper_1_source";
                selection="gear_1_damper";
                sourceAddress="clamp";
                axis="gear_1_damper_axis";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=1;
				offset0= 0;
				offset1= 0.2;
            };
            class maingear_2_suspension
            {
                type="translation";
                source="damper_2_source";
                selection="gear_2_damper";
                sourceAddress="clamp";
                axis="gear_2_damper_axis";
                minPhase=0;
                maxPhase=1;
                minValue=0;
                maxValue=1;
                memory=1;
                offset0= 0;
                offset1= 0.2;
            };
            class maingear_3_suspension: maingear_2_suspension
            {
                source="damper_3_source";
                selection="gear_3_damper";
                axis="gear_3_damper_axis";
                offset0= 0;
                offset1= 0.2;
            };
        };
    };
};

 

config.cpp class AnimationSources:

Spoiler

		class AnimationSources: AnimationSources
		{			
			/*class Camera
			{
				source = "user";
				animPeriod = 2;
				//initPhase = 1;
				initPhase = 1;
			};*/

			class bombs
			{
				source="user";
				animPeriod=1e-006;
				initPhase=0;
			};
			class AT_missiles
			{
				source="user";
				animPeriod=0.99000001;
				initPhase=1;
			};
			class damper_1_source
			{
				source="damper";
				wheel="wheel_1";
			};
			class damper_2_source
			{
				source="damper";
				wheel="wheel_2";
			};
			class damper_3_source
			{
				source="damper";
				wheel="wheel_3";
			};
			class wheel_1_source
			{
				source="wheel";
				wheel="wheel_1";
			};
			class wheel_2_source
			{
				source="wheel";
				wheel="wheel_2";
			};
			class wheel_3_source
			{
				source="wheel";
				wheel="wheel_3";
			};
		};

 

https://prnt.sc/1j0f5gj - resolution LOD gear dampers
https://prnt.sc/1j0ferp - geometry LOD (1200kg mass)
https://prnt.sc/1j0fgxk - geometry Physx LOD
https://prnt.sc/1j0fhor - memory points gear damper's axises
https://prnt.sc/1j0fihk - memory points wheels' axis, center and rim

 

If there is a lack of information for solving this issue, don't hesitate to ask, I can share with you, thanks...

Share this post


Link to post
Share on other sites

This might be a stupid question but you do have LandContact LOD? Sorry ignore this I've just realized that you do.

 

Your offset0 and offset1 values are different to your maxDroop and maxCompression values. 

Share this post


Link to post
Share on other sites
On 8/4/2021 at 2:26 PM, Invincible120 said:

But there is still an issue with my PhysX configuration


Which is basically wheels "suspended" in the air?
The damper length in PhysX configuration is counted in meters, while in the model.cfg offset0/1 values are a fraction of the length of a damper's axis (unless said axis has precisely the length of 1 m, which is clearly not the case here).
In other words, maxCompression and maxDrop gives you 20cm range of motion of (invisible physx) dampers altogheter, while model.cfg animates the actual (visible models) dampers in the range of 20% of their axes's lenght. This might be the cause of this suspension of wheels in the air (among other things).

  • Thanks 1

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

×