Jump to content
Sign in to follow this  
xceptionZERO

Strange projectile trajectory? Not sure what i got wrong in my config

Recommended Posts

I have been playing about with trying to get a bullet to fly at 100m/s (for a mod)

below is my config. Waht happens is when fired the bullet arcs instantly from the muzzle in a trajectory, but i would prefer it to leave the muzzle straight and then dip later on

class CfgPatches {

class Tw_Rifle_Mxf {

requiredaddons[] = {};

requiredversion = 0.1;

units[] = {};

weapons[] = {Tw_Rifle_Mxf};

magazines[] = {"Tw_130rnd_6mm_bb"};

};

};

/*external*/ class Mode_SemiAuto;

/*external*/ class Mode_Burst;

/*external*/ class Mode_FullAuto;

class CfgWeapons {

/*extern*/ class arifle_MX_Base_F;

class Tw_Rifle_Mxf: arifle_MX_Base_F {

begin1[ ] = {"tw_rifle_mxf\sound\TWFiring.wav", 1.778280, 1, 700};

begin2[ ] = {"tw_rifle_mxf\sound\TWFiring.wav", 1.778280, 1, 700};

begin3[ ] = {"tw_rifle_mxf\sound\TWFiring.wav", 1.778280, 1, 700};

closure1[ ] = {"A3\sounds_f\weapons\closure\closure_rifle_6.wav", 1, 1, 300};

closure2[ ] = {"A3\sounds_f\weapons\closure\closure_rifle_6.wav", 1, 1.100000, 300};

descriptionshort = "Handgun<br />Caliber: 6 mm";

dexterity = 2;

dispersion = 0.003000;

displayname = "rifle 6mm";

drysound[ ] = {"A3\sounds_f\weapons\other\dry1.wav", 0.010000, 1, 20};

cratereffects = "";

initspeed = 100;

magazines[ ] = {"tw_18rnd_6mm_bb"};

model = "\A3\Weapons_F\Rifles\MX\MXC_F.p3d";

maxrange = 100;

maxrangeprobab = 0.04;

midrange = 50;

midrangeprobab = 0.58;

minrange = 1;

minrangeprobab = 0.3;

picture = "\A3\weapons_F\Rifles\MX\data\UI\gear_mx_cqc_X_CA.paa";

recoil = "recoil_pistol";

recoilprone = "recoil_pistol";

reloadaction = "GestureReloadPistol";

reloadmagazinesound[ ] = {"tw_rifle_mxf\sound\HicappaReload3.wav", 1, 1, 30};

reloadtime = 0.130000;

scope = 2;

soundbegin[ ] = {"begin1", 0.330000, "begin2", 0.330000, "begin3", 0.340000};

soundclosure[ ] = {"closure1", 0.500000, "closure2", 0.500000};

uipicture = "\A3\weapons_f\data\UI\icon_regular_CA.paa";

weaponsoundeffect = "DefaultRifle";

class Library {

libtextdesc = "an aeg.";

};

class WeaponSlotsInfo {

mass = 7;

class MuzzleSlot {

compatibleitems[] = {"muzzle_snds_h"};

linkproxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";

};

class CowsSlot {

};

class PointerSlot {

};

};

class Single: Mode_SemiAuto {

begin1[] = {"tw_rifle_mxf\sound\TWFiring.wav", 1, 1, 1200};

begin2[] = {"tw_rifle_mxf\sound\TWFiring.wav", 1, 1, 1200};

closure1[] = {"A3\sounds_f\weapons\closure\closure_rifle_6.wav", 3.16228, 1, 300};

closure2[] = {"A3\sounds_f\weapons\closure\closure_rifle_7.wav", 3.16228, 1, 300};

dispersion = 0.00093;

maxrange = 100;

maxrangeprobab = 0.2;

midrange = 50;

midrangeprobab = 0.7;

minrange = 2;

minrangeprobab = 0.5;

recoil = "recoil_single_mx";

recoilprone = "recoil_single_prone_mx";

reloadtime = 0.096;

soundbegin[] = {"begin1", 0.5, "begin2", 0.5};

soundclosure[] = {"closure1", 0.5, "closure2", 0.5};

weaponsoundeffect = "DefaultRifle";

};

class FullAuto: Mode_FullAuto {

begin1[] = {"tw_rifle_mxf\sound\TWFiring.wav", 1, 1, 1200};

begin2[] = {"tw_rifle_mxf\sound\TWFiring.wav", 1, 1, 1200};

closure1[] = {"A3\sounds_f\weapons\closure\closure_rifle_6.wav", 3.16228, 1, 300};

closure2[] = {"A3\sounds_f\weapons\closure\closure_rifle_7.wav", 3.16228, 1, 300};

dispersion = 0.00093;

maxrange = 100;

maxrangeprobab = 0.1;

midrange = 50;

midrangeprobab = 0.7;

minrange = 0;

minrangeprobab = 0.9;

recoil = "recoil_auto_mx";

recoilprone = "recoil_auto_prone_mx";

reloadtime = 0.096;

soundbegin[] = {"begin1", 0.5, "begin2", 0.5};

soundclosure[] = {"closure1", 0.5, "closure2", 0.5};

weaponsoundeffect = "DefaultRifle";

};

class single_medium_optics1: Single {

airateoffire = 6;

airateoffiredistance = 600;

maxrange = 700;

maxrangeprobab = 0.1;

midrange = 550;

midrangeprobab = 0.7;

minrange = 2;

minrangeprobab = 0.2;

requiredoptictype = 1;

showtoplayer = 0;

};

class single_far_optics2: single_medium_optics1 {

requiredoptictype = 2;

};

class fullauto_medium: FullAuto {

airateoffire = 2;

burst = 3;

maxrange = 150;

maxrangeprobab = 0.05;

midrange = 75;

midrangeprobab = 0.7;

minrange = 2;

minrangeprobab = 0.5;

showtoplayer = 0;

};

};

};

class CfgMagazines {

/*extern*/ class CA_Magazine;

class Tw_130rnd_6mm_bb: CA_Magazine {

ammo = "Tw_6mm_bb";

count = 120;

descriptionshort = "Caliber: 6mm<br />Rounds: 30<br />Used in: ";

displayname = "13rnd 6mm mag";

initspeed = 100;

lastroundstracer = 0;

mass = 5;

picture = "\A3\weapons_f\data\ui\m_30stanag_caseless_CA.paa";

model = "\A3\weapons_F\ammo\mag_univ.p3d";

scope = 2;

tracersevery = 1;

};

};

class CfgAmmo {

/*extern*/ class BulletBase;

class tw_6mm_bb: BulletBase {

airfriction = -0.001200;

caliber = 0.200000;

cartridge = "FxCartridge_65_caseless";

cost = 100;

hit = 40;

model = "\A3\Weapons_f\Data\bullettracer\tracer_white";

nvgonly = 0;

craterEffects = "bb_impact_Null";

tracerendtime = 1;

tracerscale = 0.500000;

tracerstarttime = 0.050000;

typicalspeed = 20;

};

};

Share this post


Link to post
Share on other sites

The trajectory also depends on some degree to the distance the sights on your weapon are zeroed to.

If you have a slow-moving projectile it needs a lot of initial angular elevation, in order to drop down back cross the bore-axis again, several hundred meters down-range at the distance where the sights are zeroed.

You can reduce this initial arc by making a version the weapon+sights that are zeroed for sub-100m ranges, more in keeping with your projectile's low muzzle velocity. Having a really tiny airfriction coefficient for the ammo may also help keep the trajectory flat, but the projectile wont loose speed as realistically as it probably should.

Share this post


Link to post
Share on other sites

Overdone airfriction (high) values can very well cause that behaviour on their own.

Noticed it during making the paintball mod configs, almost drove me nutz.

Edited by Mr Burns

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  

×