Hello everyone. I got a problem about changing some animations. I have sniper system. And I have a weapon bob animation when player is in scope. And I also have another animation which is a recoil animation, which is used when player fires if it’s in scope. Here is that recoil animation :
and problem is, when I fire to the point, it hits, and then Recoil animation comes in, but it doesn’t come from the position which I hit, it goes to the main position of the camera and starts from there.
so What I want to tell is, is there a way to start an animation from the position which is camera in, not from it’s original animation positions ? Or is there any other way to make good recoil effect on scope ? I need your advices and help, here is my code for animations :
if (inScope) // if we are in Scope
{
animation.CrossFade("weaponBob"); // make a weapon Bob
if(Input.GetKeyDown("Fire1")) // if fired when in Scope
{
AnimateUp(); // work the recoil animation function
}
}
function AnimateUp() {
animation.CrossFade("recoil"); // I tried codes like CrossFadeQueued but they didn't help, or I used them wrongly.
yield WaitForSeconds(0.8);
animation.CrossFade("weaponBob");
}
thanks