Jump to content
Sign in to follow this  
zachgibson22

Eye not lined up when looking through scope

Recommended Posts

I have made a custom weapon and it works all fine and dandy.

So when I put and optic on it it's all lined up on the rail right but when I try and look though it my eye level is way low.

But my eye level is fine looking through the iron sights.

Is there another "Point" I need to add into the "Memory" LOD in O2 that is used for sights or is it Config related?

Share this post


Link to post
Share on other sites

Here is a video of what happens

Any idea's why?! And It happens with all the sights

Here's my config code

class CfgPatches
{
class tb_arifle_hkump45
{
requiredaddons[] = {};
requiredversion = 0.1;
units[] = {};
weapons[] = {"tb_arifle_hkump45"};
magazines[] = {"tb_30Rnd_556x45_B_Stanag", "tb_30Rnd_556x45_T_Stanag"};
};
};
/*external*/ class Mode_SemiAuto;
/*external*/ class Mode_Burst;

class CfgWeapons {
class tb_arifle_hkump45_base {
	access = 3;
	afmax = 0;
	aidispersioncoefx = 4;
	aidispersioncoefy = 5;
	airateoffire = 0.5;
	airateoffiredistance = 500;
	ammo = "";
	autofire = 1;
	autoreload = 0;
	backgroundreload = 0;
	ballisticscomputer = 0;
	bullet1[] = {"A3\sounds_f\weapons\shells\7_62\metal_762_01.wav", 0.1, 1, 15};
	bullet10[] = {"A3\sounds_f\weapons\shells\7_62\grass_762_02.wav", 0.01, 1, 15};
	bullet11[] = {"A3\sounds_f\weapons\shells\7_62\grass_762_03.wav", 0.01, 1, 15};
	bullet12[] = {"A3\sounds_f\weapons\shells\7_62\grass_762_04.wav", 0.01, 1, 15};
	bullet2[] = {"A3\sounds_f\weapons\shells\7_62\metal_762_02.wav", 0.1, 1, 15};
	bullet3[] = {"A3\sounds_f\weapons\shells\7_62\metal_762_03.wav", 0.177828, 1, 15};
	bullet4[] = {"A3\sounds_f\weapons\shells\7_62\metal_762_04.wav", 0.177828, 1, 15};
	bullet5[] = {"A3\sounds_f\weapons\shells\7_62\dirt_762_01.wav", 0.1, 1, 15};
	bullet6[] = {"A3\sounds_f\weapons\shells\7_62\dirt_762_02.wav", 0.1, 1, 15};
	bullet7[] = {"A3\sounds_f\weapons\shells\7_62\dirt_762_03.wav", 0.1, 1, 15};
	bullet8[] = {"A3\sounds_f\weapons\shells\7_62\dirt_762_04.wav", 0.1, 1, 15};
	bullet9[] = {"A3\sounds_f\weapons\shells\7_62\grass_762_01.wav", 0.01, 1, 15};
	candrop = 1;
	canlock = 0;
	canshootinwater = 0;
	cartridgepos = "nabojnicestart";
	cartridgevel = "nabojniceend";
	count = 0;
	cursor = "arifle";
	cursoraim = "CursorAim";
	cursoraimon = "";
	cursorsize = 1;
	cmimmunity = 1;
	descriptionshort = "Sub Machinegun<br />Caliber: 11.43×23mm";
	detectrange = 0;
	dexterity = 1.64;
	discretedistance[] = {100, 300, 400, 600, 800};
	discretedistanceinitindex = 1;
	dispersion = 0.0001;
	displayname = "HK UMP-45";
	disposableweapon = 0;
	distancezoommax = 300;
	distancezoommin = 300;
	drysound[] = {"A3\sounds_f\weapons\other\dry7.wav", 0.01, 1};
	emptysound[] = {"", 1, 1};
	enableattack = 1;
	ffcount = 3;
	fffrequency = 11;
	ffmagnitude = 0.5;
	fireanims[] = {};
	firelightduration = 0.05;
	firelightintensity = 0.012;
	firespreadangle = "3.0f";
	flash = "gunfire";
	flashsize = 0.5;
	forceoptics = 0;
	handanim[] = {"OFP2_ManSkeleton","tb_arifle_hkump45\anim\Handanim_hkump45.rtm"};
	hiddenselections[] = {};
	hiddenselectionstextures[] = {};
	hiddenunderwaterselections[] = {};
	hiddenunderwaterselectionstextures[] = {};
	htmax = 600;
	htmin = 1;
	initspeed = 0;
	irdistance = 0;
	irdotintensity = 0.001;
	irlaserend = "laser dir";
	irlaserpos = "laser pos";
	laser = 0;
	lockacquire = 1;
	lockedtargetsound[] = {"\A3\sounds_f\dummysound", 0.000316228, 6};
	lockingtargetsound[] = {"\A3\sounds_f\dummysound", 0.000316228, 2};
	magazinereloadtime = 0;
	magazines[] = {"tb_30Rnd_556x45_B_Stanag", "tb_30Rnd_556x45_T_Stanag"};
	maxleadspeed = 23;
	maxrange = 500;
	maxrangeprobab = 0.04;
	maxrecoilsway = 0.008;
	memorypointcamera = "eye";
	mfact = 1;
	mfmax = 0;
	midrange = 150;
	midrangeprobab = 0.58;
	minrange = 1;
	minrangeprobab = 0.3;
	model = "tb_arifle_hkump45\hkump45";
	modelmagazine = "";
	modeloptics = "-";
	modelspecial = "";
	modes[] = {"Single", "Burst"};
	multiplier = 1;
	muzzleend = "konec hlavne";
	muzzlepos = "usti hlavne";
	muzzles[] = {"this"};
	namesound = "rifle";
	optics = 0;
	opticsdisableperipherialvision = 0.67;
	opticsflare = 0;
	opticsid = 0;
	opticsppeffects[] = {};
	opticszoominit = 0.75;
	opticszoommax = 1.1;
	opticszoommin = 0.375;
	picture = "\tb_arifle_hkump45\UI\gear_tb_arifle_hkump45_x_ca";
	primary = 10;
	recoil = "assaultRifleBase";
	recoilprone = "assaultRifleBase";
	reloadaction = "GestureReloadEBR";
	reloadmagazinesound[] = {"A3\sounds_f\weapons\reloads\new_trg.wav", 0.1, 1, 30};
	reloadsound[] = {"", 1, 1};
	reloadtime = 0.15;
	scope = 0;
	selectionfireanim = "zasleh";
	showaimcursorinternal = 1;
	showempty = 1;
	shownunderwaterselections[] = {};
	showswitchaction = 0;
	showtoplayer = 1;
	simulation = "Weapon";
	sound[] = {};
	soundbegin[] = {"sound", 1};
	soundbeginwater[] = {"sound", 1};
	soundbullet[] = {"bullet1", 0.083, "bullet2", 0.083, "bullet3", 0.083, "bullet4", 0.083, "bullet5", 0.083, "bullet6", 0.083, "bullet7", 0.083, "bullet8", 0.083, "bullet9", 0.083, "bullet10", 0.083, "bullet11", 0.083, "bullet12", 0.083};
	soundburst = 1;
	soundclosure[] = {"sound", 1};
	soundcontinuous = 0;
	soundend[] = {"sound", 1};
	soundloop[] = {"sound", 1};
	swaydecayspeed = 2;
	tbody = 100;
	texturetype = "default";
	type = 1;
	uipicture = "\A3\weapons_f\data\UI\icon_regular_CA.paa";
	useaction = 0;
	useactiontitle = "";
	useasbinocular = 0;
	usemodeloptics = 1;
	value = 4;
	weaponinfotype = "RscWeaponZeroing";
	weaponlockdelay = 0;
	weaponlocksystem = 0;
	weaponpoolavailable = 1;
	weaponsoundeffect = "";
	weight = 0;
	class Library {
		libtextdesc = "The UMP has been adopted by various agencies such as the U.S. Customs and Border Protection. Heckler & Koch developed the UMP as a lighter and cheaper successor to the MP5, though both remain in production.";
	};
	class GunClouds {
		access = 0;
		cloudletaccy = 0;
		cloudletalpha = 0.3;
		cloudletanimperiod = 1;
		cloudletcolor[] = {1, 1, 1, 0};
		cloudletduration = 0.05;
		cloudletfadein = 0;
		cloudletfadeout = 0.1;
		cloudletgrowup = 0.05;
		cloudletmaxyspeed = 100;
		cloudletminyspeed = -100;
		cloudletshape = "cloudletClouds";
		cloudletsize = 1;
		deltat = 0;
		initt = 0;
		interval = -0.02;
		size = 0.3;
		sourcesize = 0.02;
		timetolive = 0;
		class Table {
			class T0 {
				color[] = {1, 1, 1, 0};
				maxt = 0;
			};
		};
	};
	class WeaponSlotsInfo {
		allowedslots[] = {901};
		mass = 4;
		class MuzzleSlot {
			access = 1;
			compatibleitems[] = {"muzzle_snds_L"};
			displayname = "Muzzle Slot";
			linkproxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";
			scope = 0;
		};
		class CowsSlot {
			access = 1;
			compatibleitems[] = {"optic_Arco", "optic_aco", "optic_ACO_grn", "optic_hamr", "optic_Holosight"};
			displayname = "Optics Slot";
			linkproxy = "\A3\data_f\proxies\weapon_slots\TOP";
			scope = 0;
		};
		class PointerSlot {};
	};	
	class GunParticles {
		class FirstEffect {
			directionname = "Konec hlavne";
			effectname = "RifleAssaultCloud";
			positionname = "Usti hlavne";
		};
	};
	class Single: Mode_SemiAuto {
		aidispersioncoefx = 1.4;
		aidispersioncoefy = 1.7;
		airateoffire = 2;
		airateoffiredistance = 500;
		artillerycharge = 1;
		artillerydispersion = 1;
		autofire = 0;
                           begin1[] = {"tb_arifle_hkump45\sound\UMPfiring1.wav", 1.0, 1, 1200};
                           begin2[] = {"tb_arifle_hkump45\sound\UMPfiring2.wav", 1.0, 1, 1200};
		burst = 1;
		canshootinwater = 0;
		closure1[] = {"A3\sounds_f\weapons\closure\closure_rifle_2.wav", 3.16228, 1, 500};
		closure2[] = {"A3\sounds_f\weapons\closure\closure_rifle_3.wav", 3.16228, 1, 500};
		dispersion = 0.00093;
		displayname = "Semi";
		ffcount = 1;
		fffrequency = 11;
		ffmagnitude = 0.5;
		flash = "gunfire";
		flashsize = 0.1;
		maxrange = 500;
		maxrangeprobab = 0.2;
		midrange = 250;
		midrangeprobab = 0.7;
		minrange = 2;
		minrangeprobab = 0.3;
		multiplier = 1;
		recoil = "recoil_single_trg";
		recoilprone = "recoil_single_prone_trg";
		reloadtime = 0.065;
		requiredoptictype = -1;
		showtoplayer = 1;
		sound[] = {"", 10, 1};
		soundbegin[] = {"begin1", 0.333, "begin2", 0.333};
		soundbeginwater[] = {"sound", 1};
		soundburst = 0;
		soundclosure[] = {"closure1", 0.5, "closure2", 0.5};
		soundcontinuous = 0;
		soundend[] = {};
		soundloop[] = {};
		texturetype = "semi";
		useaction = 0;
		useactiontitle = "";
		weaponsoundeffect = "DefaultRifle";
	};
	class Burst: Mode_Burst {
		aidispersioncoefx = 2;
		aidispersioncoefy = 3;
		airateoffire = "1e-006";
		airateoffiredistance = 500;
		artillerycharge = 1;
		artillerydispersion = 1;
		autofire = 0;
                           begin1[] = {"tb_arifle_hkump45\sound\UMPfiring1.wav", 1.0, 1, 1200};
                           begin2[] = {"tb_arifle_hkump45\sound\UMPfiring2.wav", 1.0, 1, 1200};
		burst = 2;
		canshootinwater = 0;
		closure1[] = {"A3\sounds_f\weapons\closure\closure_rifle_2.wav", 3.16228, 1, 500};
		closure2[] = {"A3\sounds_f\weapons\closure\closure_rifle_3.wav", 3.16228, 1, 500};
		dispersion = 0.00093;
		displayname = "Burst";
		ffcount = 1;
		fffrequency = 11;
		ffmagnitude = 0.5;
		flash = "gunfire";
		flashsize = 0.1;
		maxrange = 30;
		maxrangeprobab = 0.05;
		midrange = 15;
		midrangeprobab = 0.7;
		minrange = 0;
		minrangeprobab = 0.9;
		multiplier = 1;
		recoil = "recoil_auto_trg";
		recoilprone = "recoil_auto_prone_trg";
		reloadtime = 0.07;
		requiredoptictype = -1;
		showtoplayer = 1;
		sound[] = {"", 10, 1};
		soundbegin[] = {"begin1", 0.333, "begin2", 0.333};
		soundbeginwater[] = {"sound", 1};
		soundburst = 0;
		soundclosure[] = {"closure1", 0.5, "closure2", 0.5};
		soundcontinuous = 0;
		soundend[] = {"sound", 1};
		soundloop[] = {};
		texturetype = "burst";
		useaction = 0;
		useactiontitle = "";
		weaponsoundeffect = "DefaultRifle";
	};

};
class tb_arifle_hkump45 : tb_arifle_hkump45_base {
	scope = 2;
};
};

Share this post


Link to post
Share on other sites

Does this happen on all sights or just your own custom ones?

Firstly, your config is a bit of a mess. You need to use inheritance instead of just defining every single value over and over again:

class cfgweapons {
{
    class Default;
    class RifleCore;
    class Rifle : RifleCore {};
    class Rifle_Base_F: Rifle {};
    class tb_arifle_hkump45_base : Rifle_Base_F 
    {

Afterwards you can delete about 90% of your config entries, only state those things you're changing/that are unique to your weapon (such as the magazines it uses, the name it has, the model path, etc).

Now, my knowledge on A3 weapons is rusty, however in A2 all weapons have an 'eye' memory point that tells the game where to look when using sights. If we take the ACO sight from A3 as an example:

class OpticsModes {
class ACO {
cameradir = "";
distancezoommax = 200;
distancezoommin = 200;
memorypointcamera = "eye";
opticsdisableperipherialvision = 0;
opticsflare = 0;
opticsid = 1;
opticsppeffects[] = {""};
opticszoominit = 0.75;
opticszoommax = 1.1;
opticszoommin = 0.375;
usemodeloptics = 0;
visionmode[] = {};
};
};

we can find that entry : memorypointcamera = "eye"; defines where the eye is for the optic model. If you have custom optics, make sure they inherit from the optics already ingame so that the same functionality is retained. The custom optics may also require an eye memory point, however I'm not 100% how it works now in A3

Share this post


Link to post
Share on other sites

Make sure you also have all the attachment proxies in a "View - Pilot" LOD (together with the gun of course).

Share this post


Link to post
Share on other sites

Thank you o much Koffein! It was cause I didn't have the View Pilot LOD, I never read anywhere that I needed it so I never thought about it.

Question though, What all goes in that LOD, all I did was copy my LOD 1.000?

As for the config, I just copied that from another DL I got, But I will try about what you have mentioned!

Thank you so Much!

Share this post


Link to post
Share on other sites

View Pilot is what the 'pilot' can see - so whatever the person holding the gun can see in this case.

What it's useful for is you can make the weapon higher poly in first person, and then a lower poly one for the other views (i.e. the weapon as seen on another unit). You can also be quite specific about where the weapon is to be high poly, i.e. you don't really every see much of the right hand side of the weapon, so you can model on bolt catches, holes, rivets, etc on the left side and not the right.

It really comes into it's own in vehicles though, as it allows you to delete a lot of the exterior of the vehicle, as the driver (pilot) will hardly see those faces, and reusing the faces to make a higher detail interior than could be seen fron the outside.

Share this post


Link to post
Share on other sites

Ahh I see, So View Pilot is what I see in first person and LOD 1-5 or so is what i would see in 3rds person or on another unit? Or Do I see LOD 001. Because When I didn't have "View Pilot" I feel like that's what I was looking at

Share this post


Link to post
Share on other sites

If you don't have a view pilot, it will use your first resolution LOD instead. First person may have been a bad term to use in this case:

It is used for the 'user' of the weapon - so when you look at your weapon, in first person, you'll see the View Pilot LOD (assuming it has one).

If you're the driver of a vehicle, if you're in first person, inside that vehicle, it will use the View Pilot LOD

and so on, and so on. If you switch to third person, or look at another unit holding the weapon, it uses the resolution LODS on those.

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  

×