Hi,
My goal is to set opening animation for my player. So, I made a schematic like this:
And it works perfectly, but I can still move my player alongside with playing animation. I'm using "Button" player controls:
Basically, I want to block player controls at the time animation is playing. Is there another way to do that or I did something wrong?
Regards,
Sylwester
You should be able to put a console node before + after the animation node to verify this, but if so then you'd need to just be sure the Mecanim definition matches the actual clip name to get accurate wait durations back.
There's a quick start thread I did for Mecanim (second post goes over an example of playing a Talk animation and blocking player control until its done), and here's a screenshot from that illustrating what I'm trying to say above with animation names:
Unfortunately, it still doesn't work. Animation Clip and the name matches actual .anim animation name. I checked "Wait" option in Mecanim Animation node and I still can move the player while animation is playing.
Maybe it's because I have "Use Auto Animation" checked?
In Animator panel I have "Idle" as a default state. I just want to start with "Sleeping" animation, then stand up and go to idle.
For now, he is sleeping, but when I hit "W" to go forward, my character suddenly goes to "Walk" animation.
I set this animation in ORK like this:
You can try just adding a regular Wait node after the animation and before the unblock for however long you want it to wait. If you can move during this wait (like if you set it super long like 5 seconds) then the issue is in the blocks / character controller.
Another possibility is that your animation is very short ( just a few frames ) in which case the reported wait time will also be short since it'll be "done". Setting the animation to loop or using the hard defined wait as above should handle this.
If you plan on calling standing and then idle after this animation though, I think the hard defined wait node is probably your best bet anyways since you can control the exact times before starting the next animation.
So now it looks like this:
Works like a charm :) Thank you very much for help!