Ok 2 questions
First i have a solider in 3rd Person and if i press "g" it plays an animation which moves his arm like he throws a grenade and a grenade will be shoot
know i i have the problem that the my arm must be ready before the grenade is launched so the grenade is launched maybe at the half time of the animation i thought that if i would put a timer in my shoot script that says if i press g it waits 2 seconds and than it shoots put i dont know how to write in script
the second problem is my character makes a walk animation but if the walk animation is played the grenade throw animation could not be played at the same time
Thanks for your ideas LG Leonard
The Animation View - Animation Events video may be of help to you:
Answer by Noise crime
Jul 20, 2010 at 06:13 PM
Why not simply add an event to your throwing animation so it calls a function to trigger the throwing of the grenade at the right time? Far more precise than using a timer.
You'll have to 'copy' the animation if its imported in order to add an event.
More details here.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users post good questions and use the site effectively we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
No one has followed this question yet.
The name 'Joystick' does not denote a valid type ('not found')
Problem with "stun"-timer after player is being hit
How do i know if a animation is finished or not ?
Get animation work
Reverse Animation with "PlayQueued"