How do I get the bone transforms of a particular Montage frame or time?
Hello, I would like to get the bone locations and rotations of a specific time within a montage, without having my skeleton actually be on that frame/time when animating. I would like this so I can sweep a component alongside the path of the bone with substeps between the frames in case of low framerate, in order to combat the collision inconsistencies that would arise from such a low framerate.
I at first attempted to use the function Montage->GetAnimationPose, as I figured it would do exactly what I want, however, that function is virtual and not actually implemented for montages, and as such calling it would do nothing but cause the engine to crash. Therefore, it is not an option.
Is there an easy way to do such a thing?
EDIT: So I figured out I can pull out something out of the montage called an FAnimTrack using the GetAnimationData function, which does provide a similar function to get a pose at a certain time, presumably for a particular animation slot within the montage. This would actually well enough, but calling that function leads to external linker errors which I have no idea how to fix, and there doesn't seem to be anything online about them, so that kind of sucks. Does anyone have any ideas?
EDIT 2: I assume that solution is a lead balloon as well either way, because upon attempting to copy-paste the function to get around the linker error, the function will more or less just crash anyway, because it requires the Pose and Curve parameter inputs to be initialized first, and I can't seem to find the info I'd need for this readily available through the skeletal mesh or its anim instance.
Perhaps I'm overthinking this. Could there mayhaps be a method to immediately pose a skeletal mesh component using a montage frame without having to wait a frame for blending etc. ? This way, I could spawn a new skeletal mesh component, pose it to the frame I want and get its bone transforms. Any ideas?
Maybe I have to get the pose and curve structs from some function I haven't found yet? Surely it can't be impossible to get an arbritrary frame/pose from within a montage, can it?
Follow this question
Once you sign in you will be able to subscribe for any updates here