Jump to content
Sign in to follow this  
Bnae

Bolt action speed

Recommended Posts

Hello,

            /////////////////////////////////////////////////////
            //Bolt after firing the weapon

            class bolt_back
            {
                type="translation";
                source="reload";
                selection="bolt";
                memory=1;
                sourceAddress="clamp";
                minValue=0;
                maxValue=1;
                begin="bolt_start";
                end="bolt_end";
                offset0=0;
                offset1=0.5;
            };
            class bolt_rot: Rotation
            {
                type="rotation";
                source="reload";
                selection="bolt";
                axis="bolt_axis";
                memory=1;
                sourceaddress="clamp";
                minvalue=0;
                maxvalue=0.1;        
                angle0="rad 0";
                angle1="rad -60";
                animPeriod= 0.6;
            };
            class bolt_rot_return: bolt_rot
            {
                minvalue=0.9;
                maxvalue=1;        
                angle1="rad +60";
            };

Cannot figure out why the bolt goes back immediately and returns slowly, same with rotation. I would like it to first turn 60rad then go back and return smoothly and turn -60rad and end. Working on this atm.

All help appreciated!

Share this post


Link to post
Share on other sites

 

animPeriod= 0.6;

this does nothing inside model.cfg.

 

 

remember: https://community.bistudio.com/wiki/Model_Config#Animation_sources

reload goes from 0 to 1 after each shot. And once the reloadtime is completed it stays at 1 (iirc). That means that if you fire a shot, it goes immediately to offset0 (minvalue), and goes to offset1 (maxvalue) and stays that way. You need 2 translation animations for back and forwards motion of the bolt.

  • Like 1

Share this post


Link to post
Share on other sites

this does nothing inside model.cfg.

 

 

remember: https://community.bistudio.com/wiki/Model_Config#Animation_sources

reload goes from 0 to 1 after each shot. And once the reloadtime is completed it stays at 1 (iirc). That means that if you fire a shot, it goes immediately to offset0 (minvalue), and goes to offset1 (maxvalue) and stays that way. You need 2 translation animations for back and forwards motion of the bolt.

 

Now i got it. Thanks x3kj!

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  

×