Jump to content
Sign in to follow this  
max power

explaining the cfgRecoils array

Recommended Posts

I'm interested on getting more complete information on how cfRecoils works. The biki is woefully under informed. I will update it with my findings here.

Example CfgRecoils:

class CfgRecoils
{
 someRifle_Recoil[] = 
  {
   0.000000,0.000000,0.000000,  
   0.060000,0.010000,0.010000, 
   0.100000,0.000000,-0.018000, 
   0.100000,-0.010000,0.010000, 
   0.050000,0.000000,0.000000 
  }; 
}; 

The Biki and some other sources explain that each 3 number set represents time in seconds, the rearward recoil (???) in meters, and the muzzle climb in radians. However, I can not find any information on what each of the 5 sets in the array represent. For pistols, there are 4 sets, and for launchers, 3. Does anyone have any information on this?

Share this post


Link to post
Share on other sites

They're in tuples (triplets, sets of 3's)... each set of 3 represents a 'movement'.

If you have 1 set of 3, then 1 movement, if you have 15 sets of 3 then 15 movements, rather alot. It's common to have about 3-4 sets, and depending on the time taken for each movement this will influence the total time for the 'recoil'.

Share this post


Link to post
Share on other sites

I have what the three numbers in each set means. What I want is what each set in the array means. Like, are they impulses that correspond with a certain phase of shooting? Some comments in a config file said that the last was a 'nihilator', and by that I think the author meant 'terminator', and should be set to 0 movement and rotation. Is the first the recoil experienced when pulling the trigger on an empty gun, being zeroed out for every weapon? Are the next three different recoil phases, or randomly chosen during shooting for each shot? Something else?

Share this post


Link to post
Share on other sites

As far as i understand it (which isn't pretty far anyway) it works like a timebased animation. Each step defining the running time and recoilBack and recoilUp endpositions of the step. So you can have as much steps as you think it needs to "design" the perfect recoil.

Share this post


Link to post
Share on other sites
As far as i understand it (which isn't pretty far anyway) it works like a timebased animation. Each step defining the running time and recoilBack and recoilUp endpositions of the step. So you can have as much steps as you think it needs to "design" the perfect recoil.

Great! I think you're right. I'll confirm this then update the Biki.

Share this post


Link to post
Share on other sites

Even so, I still cannot understand the meanings of numbers.

Third set of 3 is based on Second set of 3, or is absolute position related to 0,0,0??

Since we have the data, I wonder whether we can conduct a calculation and present the recoil with simple parameter, so that players could compare the recoil very easy and straight forword.

class CfgRecoils
{
 someRifle_Recoil[] = 
  {
   0.000000,0.000000,0.000000,  
   0.060000,0.010000,0.010000, 
   0.100000,0.000000,-0.018000, 
   0.100000,-0.010000,0.010000, 
   0.050000,0.000000,0.000000 
  }; 
}; 

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  

×