Search code examples
c++unreal-engine4

USplineComponent Bounds SphereRadius failed infinite


I`m new here.I have a problem using USplineComponent.

I`m using C++ project (Unreal 4.22) and I use USplineComponent to make a Animation in my pickup items event.

The problem occurs exactly when I build my Game (Development, Shipping, etc..)

In Editor Mode it doesn`t!

I`m getting this error:

> LogOutputDevice: Error: Ensure condition failed:
> !Primitive->Bounds.BoxExtent.ContainsNaN() &&
> !Primitive->Bounds.Origin.ContainsNaN() &&
> !FMath::IsNaN(Primitive->Bounds.SphereRadius) &&
> FMath::IsFinite(Primitive->Bounds.SphereRadius)
> [File:D:\Build\++UE4\Sync\Engine\Source\Runtime\Renderer\Private\RendererScene.cpp]
> [Line: 1187] [2020.01.19-17.16.43:790][ 57]LogOutputDevice: Error:
> Nans found on Bounds for Primitive SplineComp: Origin
> X=-4853943853456317127469964460032.000
> Y=41148151269357898046636032.000
> Z=18115167077902705087822314864640.000, BoxExtent
> X=4853943853456317127469964460032.000 Y=41148151269357898046636032.000
> Z=18115167077902705087822314864640.000, SphereRadius inf

My SphereRadius is "inf" (Infinite?)

UE_LOG(LogClass, Warning, TEXT("BOUNDS SPLINE: %f"), SplineComp->Bounds.SphereRadius); // return "inf"

Other detail is that my "Bounds.Origin" and "Bounds.BoxExtent" has a large number.

It doesn't always happen, it's variable. This error causes a fail in my game and does not generate my item.

Has anyone had this problem? Is there a possibility to limit this?

Thanks.


Solution

  • I changed my implementation. I removed the GetLocationatDistanceAlongSpline. This function was returns inaccurate information... https://issues.unrealengine.com/issue/UE-27979

    Now, I have used a Linear Interpolation with Timeline function Thanks for Help!