Reset Player animation
I'm having animation played when player dies but after the teleport the character doesn't reset back to thirespersonanimation BP. The character stays in the position of ending animation. How would I have him reset back original animation on teleport. Help. Thank you!!!
asked Dec 20 '17 at 05:49 PM in Using UE4
I had a similar problem. A dynamic folding door that I needed to reset when the player restarted the level (I didn't want the hitch of re-loading the level, so I made everything go back to initial state).
I did it by creating a animation with only the door in its ref pose. I applied the animation in the level door and, since physics simulation take over the bones, it didn't affect door interaction. Then, when I want to reset the door, I disable physics in the dynamic bones for two frames and re-enable it.
Each Delay(0) delays one frame. Only a single frame wouldn't do it. The animation would take over but I think bones velocities were kept, so when I turned physics back on in the next frame, the doors would shake, like something had just moved them. Two frames seem to successfully cancel out physics velocities.
answered Dec 24 '18 at 08:31 PM
I would use the animation BP for that in combination with a custom boolean. After the begin play remove the Play animation node and add there your Custom boolean Set true (make the boolean variable inside of your SidescrollerCharacter). after the delay node Set your boolean to false.
OnBeginOverlap>Set boolean true>delay (6sec)> Set boolean false
Inside the Animation Blueprint in the graph cast to your SideSCrollerCharacter2 (i hink in the example they already have a reference). From there you can get your boolean and promote it to a variable (inside animBP). The only thing then you need to do is to make a transition between the default animation (idle/walk/run blend i guess) and your animation. For that just create a new state for example HeadGesture the transition conditions are: Default>HeadGesture: get (your promoted boolean) HeadGesture>Default: get (your promoted boolean) NOT
Hope that help let me know if it is understandable. ^^ GLHF
answered Dec 20 '17 at 08:23 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here