Hey folks -
I’ve tried my best to diligently search for answers and test a number of alternatives before posting here, but I can’t seem to wrap my head around this one. At least I’ve narrowed it down to the one specific thing that is giving me problems. In a nutshell, while running a fresh clean install of 4.10.1, I cannot seem to get my vehicle/character to blend properly between cached poses, simple anims or even between machine states in-game. Everything works fine in the Preview pane, but while playing the character stays stuck in the previous pose/anim/state if I use even tiny blend times (0.1). When set to 0.0, I can pop immediately to the correct pose, but this is not the behavior I want to happen.
Quick overview, I have a flying vehicle (so nothing complicated like running → walking → idle going on) that transforms shape based on the current active fire mode. When using lasers, I have those guns popped out and when I switch to, say, a gatling machine gun then I want that stuff to pack away and deploy the new weaponry. Way easier than any humanoid-based FPS for sure.
So here’s how I tried to set this up. Given I have a number of weapon configs, I didn’t want to create all possible animations switching from #3 to #1 and #2 to #5 etc. Instead I used some Transform Bone modifiers to directly modify my ship’s shape (rotate open a hatch, extend out a laser, etc) and cache that into a pose for a given weapon. My final pose comes out of a “Blend Poses by Int” node, to which I’ve added a new pin for every pose I have. The Event Graph is super simple - I ask my owning player “hey what weapon we got?” and pump that in my Active Child Index (per below). Preview works perfectly - in-game nothing happens. When debugging I found the value arrives here just fine however the node refuses to switch up based on its value. However - what I did find is that it works when the blend times are set to 0.0, but get stuck at any other value. So in this example below - I can immediately pop from any pose on here except for #4 where I have a blend time of 1.0. When 4 is fed in, the node stays on whatever previous child it was currently using (except for the preview instance). Odd right?
http://s15.postimg.org/tp5qdwo4r/Prob1.jpg
To rule out a problem with using cached poses and bone transforms, here’s another attempt using straight up animations. I made a couple of key frames for each final pose I want, and am trying to blend between them using the same technique. Exact same issue. So where above I’m showing the preview instance and the node is going to #4 just fine - this image below is set to the instance of my character in-game. Hovering over the child index value, you can see it says to go to #4. However, the white lines are still feeding #0 (which is the weapon I came from). I’ve promoted a float variable to set the blend times and this is set to 0.375 at the bottom there. When 0.0, I can pop - anything else - I cannot.
http://s15.postimg.org/y0uc2wv1n/Prob2.jpg
Figuring maybe the “Blend Poses by Int” node itself is somehow buggered in 4.10, I tried a completely different route using the State Machines themselves and discovered the exact same problem there! Here I’ve got a “State” for each weapon with only the pose anim going straight to a final pose inside each state. The connection rules are also pretty simple, just with a single test on the current weapon index allowing transitions from state to state. I would hate to go down this path simply because every time I add another weapon I’d have to create more transitions to and from every other one I already have. So here’s the weird thing in this setup… If I put any Duration greater than 0.0 in the Blend Settings on any of these transitions, they ALSO stop working. Once again I can pop from state to state if zero, but any linkage blending greater than 0 will prevent transition regardless if the “Can Transition” logic gives it the go-ahead. Anybody else seeing this, or am I a lucky guy?
http://s15.postimg.org/4keq0hoob/Prob3.jpg
Workaround:
Here’s how I finally cracked it, at least for now. Also a bit of a maintenance headache, but it does work. It’s really just recreating that original node the long way. I’ve got a series of standard Blend nodes lined up in a row, and am changing the Alphas uniquely for each pose I have. So setting those 4 floats to something like 1-1-0-0 I can get to the middle pose. That gets me to the right pose, but those nodes don’t support any sort of blending over time. (If they did, I’d imagine they’d also be broken LOL).
http://s15.postimg.org/5dvx6uk2z/Prob4.jpg
To support blending of these Alphas out in the Event Graph, now each Alpha also needs a duplicate variable which I set as a Target goal and I have to RInterpTo my way there over time… UGH
http://s15.postimg.org/6rnk25jcb/Prob5.jpg
For the record, this is a clean project with no other animations or anim graphs or anything in it that could be causing conflicts. (We’re just porting now over from UDK - we did similar pose type work there using SkelControls in an AnimTree). I’ve made sure nothing is calling back into my event graph repeatedly to get things hung up. The popping worked, as does the workaround, so the mesh is setup right with the Anim BP ref and they all communicate with the character and back. It just seems like the AnimGraph cannot work with timers behind the scenes… Some sort of Tick group issue, IDK. If you notice in pic #4, I also have a slot setup to play montages and even those do not play. Probably something for a separate question, I get it. But even something as stupid simple as a Keybind → Get Mesh → Get its Anim BP → Cast to My Anim BP → Play Montage (in a clean Pawn with nothing else) will return a value equal to the timed length of the montage but will not play the animation inside it. Notify events in that montage wont report back being triggered, so again its like time freezes in the Anim BP.
Sorry for the TL:DR novella here, but hopefully somebody can go “hey dummy, you forgot to check this box” somewhere obvious and presto it works correctly. I’m out of ideas otherwise. Thanks for any help!