- Home /
Wrong Shoot Animation
I have made a shoot animation where the camera goes up but when I am looking up and press fire1 the camera look at center goes up an then return where I was looking Ok how can i make the gun goes up by scripting
It seems that your camera animation is not "relative" (i don't know how to say that). In simple words, your first animation key on the camera rotation is 0. So when you play the animation, it goes back to 0 then play the animation in world space.
I think that you should try to parent your camera to a locator ( transform/empty gameObject or something like that) Then ins$$anonymous$$d of rotating the camera to aim, rotate the transform (The camera will follow)
Then, when the animation will play, it will be played int the local space of the transform.
@$$anonymous$$haledAhmend11 How about ins$$anonymous$$d of asking how to use it here, you look it up :)
@Sephius That would solve nothing. From reading the question, it is obvious that he has an animation for a character thats supposed to work on top of all other animations/procedural animations. He therefore needs an additive animation. Seperating the camera from the animation would just free the camera from that one issue. Depening on the rest of his system, it would cause a whole bunsh of other problems with camera animations and it does not solve the "gun" going back to a forward rotation.
Ew, sorry, i'm not really good at english so i think that i misunderstood the question. I thought that the problem was on the camera animation, not on the weapon's one.