I've been trying to blend animations and i just can't seem to get it working. I tried before, and got back to it now that i'm making the sentry-gun for the guard-dog. But i cant figure it out, or find any information about it.
What i'm trying now is just have a idle animation for the sentry where it turns from left to right, and i would like to blend the barrel-spin animation over that for when it's firing. In the end i want to blend in different anims depending on what's happening, but for now getting this to finally work would be awesome.
My thought was it has to do with using setanimknob and setanimknoball maybe? But i'm unsure if i would also need to convert/export the anims in a different way, and if the animtree is related to this somehow? etc etc. I've tried quite some combinations that seemed to make sense to me, but either just one of the animations is playing or none at all..
By blend do u mean play it, and make it look natural? cuz if so, the engine usually does that naturally. Is your turret part of the dog or a separate entity? this would determine what to use. if its a script model, use setanim(); if its part of the ai, use AnimScripted(); If the turret is an actual turret, then im pretty sure its animscripted() aswell. If you want, i can look into it a bit more.
I'm prob using a term i shouldn't have used i should explain a bit better maybe.
I would like the idle-anim for the turret to keep playing ( so it keeps looping from left to right ), and then 'add' certain animations on top of that for example have an animation in maya that only spins the barrel and basicly play both of those animations at the same time on the model, so the barrel spins and the sentry turns from left to right at the same time.
If you want scripts / features made for you, then contact me by PM or email / skype etc it will cost you tho so if you have no intention of reciprocating don't even waste my time
Looks like with just using setanimrestart i'm getting the best results up till now. I can just call both anims at the same time on the model, and use their weights to determine what's playing.
If i do it as in the example above, both anims play. When i set both their weights to the same nr, it's playing a blend of both anims
Doesn't really seem to matter if i use relative or additive in assman though, but my guess is a propper setup animtree would maybe make a difference there Double Post Merge: June 21, 2015, 05:09:25 pm
Then your free to use whatever other anims you need in place?
I tried that at first, but i dont just want to rotate the whole gun. The base need's to stand still. So i seperated the sentry into a few models so i could rotate the right parts, and linked them together in script. After that i wasn't able to rotate the individual parts anymore
Last Edit: June 21, 2015, 05:09:25 pm by BluntStuffy
I'm prob using a term i shouldn't have used i should explain a bit better maybe.
I would like the idle-anim for the turret to keep playing ( so it keeps looping from left to right ), and then 'add' certain animations on top of that for example have an animation in maya that only spins the barrel and basicly play both of those animations at the same time on the model, so the barrel spins and the sentry turns from left to right at the same time.
Ohh i get it. So u want to do something like the death machine. The death machine's animation isnt one but 2 animations. One on the barrel and one for everything else. SO you have to do it the same way, say you want the dog (the one in your profile pic) to be in an idle state without any spinning on the barrels of the gun, but then a zombie comes by, u still want it to be in idle, but you also want it to spin while shooting. This would mean you would be using 3 animations in all. The animations would have to exported in a unique way. You would have to export the dog and all the turret's parts except the barrel into one animation. Then you would have to export only the barrel into another anim.( of corse in this case since it doesnt need to spin or do anything, you could just use a clear anim, but that wouldnt help the example ) Then export the barrel spinning so that it is rotating in that animation. Make sure that that is the only thing selected, not even tag_origin should be. Then in asset manager you should import the dog's idle anim normally, but the other 2 should be additive. Then when the zombie isnt by, just set the anim to idle then set it to the idle gun anim, and when it does pass by, set the anim to shoot. This is just a theory since ive never had to do anything complex like this with anything I have ever done, so please tell me how it goes. If it doesnt work, tell me and ill actually test my next theory before posting it. Also if you do not understand any of this post, feel free to PM me and ill explain it better
Last Edit: June 21, 2015, 10:41:37 pm by liamsa669
Looks like with just using setanimrestart i'm getting the best results up till now. I can just call both anims at the same time on the model, and use their weights to determine what's playing.
If i do it as in the example above, both anims play. When i set both their weights to the same nr, it's playing a blend of both anims
Doesn't really seem to matter if i use relative or additive in assman though, but my guess is a propper setup animtree would maybe make a difference there Double Post Merge: June 21, 2015, 05:09:25 pmI tried that at first, but i dont just want to rotate the whole gun. The base need's to stand still. So i seperated the sentry into a few models so i could rotate the right parts, and linked them together in script. After that i wasn't able to rotate the individual parts anymore
how about two models, but a invisible material on the base on one, the the gun part for the other? or even have two models and delete the irrelevent mesh?