TLDR: Does anyone happen to know how I can access the final blendspace weights/samples from the UBlendSpace
class?
Over the last few days, I’ve been attempting to make a distance-matching blendspace node. This is meant to be similar to a BlendSpaceEvaluator
, but it will take in distance rather than time. The below picture shows the (nonfunctional) node I’ve made so far.
I’ve already made a proof of concept, the result of which is shown in the below video, and it works well, but that was without the use of a specialized node. It’s cumbersome to iterate with that approach though.
My plan is the following:
- From the my custom Anim Node Behavior struct (
FAnimNode_BlendSpaceDistanceMatch
), grab the relevantBlendSamples
determined by theUBlendSpace
class, which I think are those that have a weight higher thanZERO_ANIMWEIGHT_THRESH
. - From those samples, get the current play time using the
DistanceCurve
. - Normalize that time based on each
BlendSample
’s total play length. - Sum to get the weighted normalized time:
WeightNormalizedTime = NormalizedTimes.[1] * BlendSample.Weight[1] + NormalizedTimes.[2] * BlendSample.Weight[2] + ...
or something like that.
My current dilemma is figuring out how to get the BlendSamples
and corresponding weights. From what I can tell, this information is hidden away in an FBlendSampleData
struct that I can’t seem to access (unless I’m missing something).
Does anyone happen to have any suggestions?