Jump to content
Sign in to follow this  
hcpookie

Shell eject direction / velocity?

Recommended Posts

I am working on adding shell eject view the GunParticles class.  I can make them appear no problem.  My question is whether or not they can be given velocity so they correctly eject in a certain direction? 

 

https://onedrive.live.com/?cid=5B54FC51A7917265&group=0&id=5B54FC51A7917265!23751&parId=5B54FC51A7917265!22139&o=OneUp

 

As you can see from this pic, they just spawn at the memory point, and fall straight to the ground.  They need to be flung in a sideways arc.  Can this be done within the GunParticles class?

Share this post


Link to post
Share on other sites

yes this can be done. just look at vanilla eject effects for handweapons and the likes. Instead of just one memorypoint they use a start and end point. By modifying the endpoint you can change the distance it is flung basically (idk if it affect velocity or just delays the effect of gravity on the particle)

Share this post


Link to post
Share on other sites

No, simply moving the memory points does nothing to affect the "velocity" or angle of the ejected shells.

 

According to here:

 

https://community.bistudio.com/wiki/Arma_3_Particle_Effects:_Config_Parameters

 

These variables affect the particles, however there are NO EXAMPLES that I can find!  In what config are the effects stored, or are there examples somewhere?

  • positionX - position of the memorypoint defined in paremeter positionName as vector
  • positionY - position of the memorypoint defined in paremeter positionName as vector
  • positionZ - position of the memorypoint defined in paremeter positionName as vector
  • directionX - direction to the memorypoint defined in paremeter directionName as vector in world coord
  • directionY - direction to the memorypoint defined in paremeter directionName as vector in world coord
  • directionZ - direction to the memorypoint defined in paremeter directionName as vector in world coord
  • directionLocalX - direction to the memorypoint defined in paremeter directionName as vector in weapon coord
  • directionLocalY - direction to the memorypoint defined in paremeter directionName as vector in weapon coord
  • directionLocalZ - direction to the memorypoint defined in paremeter directionName as vector in weapon coord
  • vehicleSpeedX - weapon movement as vector in world coord
  • vehicleSpeedY - weapon movement as vector in world coord
  • vehicleSpeedZ - weapon movement as vector in world coord
  • vehicleSpeedSize - speed of weapon movement
  • vehicleSpeedLocalX - weapon movement as vector in weapon coord
  • vehicleSpeedLocalY - weapon movement as vector in weapon coord
  • vehicleSpeedLocalZ - weapon movement as vector in weapon coord
  • vehicleSpeedLocalSize - speed of weapon movement
  • isWaterSurface - 1 if the surface under weapon is land, -1 for water
  • distToSurface - vertical distance between muzzle and surface
  • dustness - dustness of surface
  • humidity - humidity of the air (depends on rain)

Share this post


Link to post
Share on other sites

No, simply moving the memory points does nothing to affect the "velocity" or angle of the ejected shells.

well thats because shells are handled via native implementation, and you are trying to do it manually for some reason...

 

from cfg weapon

cartridgePos = "nabojnicestart"; //memorypoint

cartridgeVel = "nabojniceend"; //memorypoint

cfgammo

cartridge = "FxCartridge_127"; //particle
use the ingame config viewer to check effect configs (accessible from missioneditor)

Share this post


Link to post
Share on other sites

No, your response indicates you misunderstand my question.  "For some reason" is because I'm adding shell eject logic to new vehicles.  There is therefore no "native" value which simply doesn't make any sense.  Did you see the picture?  I am asking about how to add these to VEHICLE weapons.  The class GunParticles I am using is copied directly from a BIS config file and the memory points are defined within the model.  The question is whether this can be manipulated other than "start", "end", and "type" values.  Which is all the BIS config files contain.  I didn't think this would be such a difficult thing.

Share this post


Link to post
Share on other sites
class CfgCloudlets
{
    class Default;

    class MachineGunCartridge2;
    class RHS_30mm_Catridge : MachineGunCartridge2
    {
        moveVelocity[] = { "-directionX * 3", "- directionY * 3", "- directionZ * 3" };
        particleShape = "\rhsafrf\addons\rhs_c_heavyweapons\rhs_casing_30mm.p3d";
        size[] = { 1 };
        sizeVar = 0;
    };
};
class RHS_30mm_Catridge
{
    class RHS_30mm_Catridge
    {
        simulation = "particles";
        type = "RHS_30mm_Catridge";
        position[] = { 0, 0, 0 };
        intensity = 1;
        interval = 1;
        lifeTime = 0.05;
        qualityLevel = 2;
    };
    class RHS_30mm_CatridgeMed
    {
        simulation = "particles";
        type = "RHS_30mm_Catridge";
        position[] = { 0, 0, 0 };
        intensity = 1;
        interval = 1;
        lifeTime = 0.05;
        qualityLevel = 1;
    };
};

default vehicle cartridges don't have velocity so you have to create your own effect

Share this post


Link to post
Share on other sites
class CfgCloudlets
{
    class Default;

    class MachineGunCartridge2;
    class RHS_30mm_Catridge : MachineGunCartridge2
    {
        moveVelocity[] = { "-directionX * 3", "- directionY * 3", "- directionZ * 3" };
        particleShape = "\rhsafrf\addons\rhs_c_heavyweapons\rhs_casing_30mm.p3d";
        size[] = { 1 };
        sizeVar = 0;
    };
};
class RHS_30mm_Catridge
{
    class RHS_30mm_Catridge
    {
        simulation = "particles";
        type = "RHS_30mm_Catridge";
        position[] = { 0, 0, 0 };
        intensity = 1;
        interval = 1;
        lifeTime = 0.05;
        qualityLevel = 2;
    };
    class RHS_30mm_CatridgeMed
    {
        simulation = "particles";
        type = "RHS_30mm_Catridge";
        position[] = { 0, 0, 0 };
        intensity = 1;
        interval = 1;
        lifeTime = 0.05;
        qualityLevel = 1;
    };
};

default vehicle cartridges don't have velocity so you have to create your own effect

 

Thanks for this info, much appreciated!

Share this post


Link to post
Share on other sites

Here I am months later and just getting around to testing this.  Works!  Thanks reyhard for your link.  So I got my SA22 shell eject working.  Adding it to my other AAA systems.

 

I added this:

 

class CfgCloudlets {
    class MachineGunCartridge2;
    class pook_30mm_Catridge_L: MachineGunCartridge2 {
        moveVelocity[] = { "-directionX * 6", "- directionY * 3", "- directionZ * 3" };
        particleShape = "\pook_SA22\wep\_shell30mm.p3d";
        size[] = {1};
        sizeVar = 0;
    };

};

class pook_30mm_Catridge_L {
    class pook_30mm_Catridge_L {
        simulation = "particles";
        type = "pook_30mm_Catridge_L";
        position[] = {0,0,0};
        intensity = 1;
        interval = 1;
        lifeTime = 0.05;
        qualityLevel = 2;
    };
    class pook_30mm_Catridge_LMed: pook_30mm_Catridge_L {
        qualityLevel = 1;
    };

};

and under the cfgWeapon:

		class GunParticles {
			class Effect {
				effectName = "AutoCannonFired";
				positionName = "2A38_2_Target";
				directionName = "2A38_2_Source";
			};
			class Effect2 {
				effectName = "AutoCannonFired";
				positionName = "2A38_3_Target";
				directionName = "2A38_3_Source";
			};
			class Shell1 {
				positionName = "shell_eject_pos1";
				directionName = "shell_eject_dir1";
				effectName = "pook_30mm_Catridge_L";
			};
			class Shell2 {
				positionName = "shell_eject_pos2";
				directionName = "shell_eject_dir2";
				effectName = "pook_30mm_Catridge_L";
			};

		};


and got this:

 

shelleject1.jpg

 

 

I was thinking I needed a distinct Left and Right but the mem points sort that out.

 

I played with the values further for the ZSU since real life footage shows those shells eject almost horizontally.

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  

×