void UUsefulFunctions::Test3(UInterpTrackMove * a)
{
if (!a) return;
UInterpTrackInstMove* b = Cast(a->TrackInstClass->GetDefaultObject());
if (b)
{
b->ResetLocation = FVector(0.f, 0.f, 100.f);
b->ResetRotation = FRotator(0.f, 0.f, 0.f);
a->UpdateKeyframe((a->GetNumKeyframes()-1),b); // this line causes a crash due to b
}
else GLog->Log("Cast<UInterpTrackInstMove> failed");
}
Hello. I want to change the value of a certain Keyframe in an InterpTrack (Matinee). The function “UpdateKeyframe(int32 KeyIndex, UInterpTrackInst * TrInst)” as you can see requires a pointer to “UInterpTrackInst”.
This is where my problem resides. It always crashes when i try to transfer it. I have no idea what kind of “UInterpTrackInst” I have to transfer. According to API there isn’t a way to get an object of it so I thought I have to create one which results in a crash.
API:
http://api.unrealengine.com/INT/API/Runtime/Engine/Matinee/UInterpTrackInstMove/index.html
https://api.unrealengine.com/INT/API/Runtime/Engine/Matinee/UInterpTrack/index.html