Triggering code in certain phase of animation
Hello. I am attempting to create a FPS game that allows the player to switch between weapons. I currently have an empty object in the position of the character's hand with a few children object, each being a different weapon. Only one of them (the active weapon) is active at a time. I am facing difficulties in creating the animation of switching weapon. I would like the hand (the empty parent object) to move out of screen, then move into screen again carrying a different weapon. I already created the animation, but am unsure on how to trigger the code that hides the previous weapon and shows the new weapon at the exact frame that the hand is outside the screen. What would be the best approach to achieve this?
Your answer
Follow this Question
Related Questions
Animator: multiple characters and one script 0 Answers
Problem adding reference on VS 1 Answer
Multiple animations on the same GameObject won't work 0 Answers
How do i play animation when my player is moving 1 Answer
How to draw a model in the preview window of my custom editor using OnPreviewGUI? 0 Answers