Location and Rotation are both zero(0)

In the lesson Line Tracing By Channel I am getting zero’s for both Location and Rotation. I posted the code below. Any help would be appreciated.

Location and Rotation are not floating point values themselves so is incorrect to use the %f specifier.

You can get a string representation of them and then use * to get the string as a TCHAR array needed for formatting

UE_LOG(LogTemp, Warning, TEXT("Location = %s"), *Location.ToString())

Thanks Dan: I’ll remember that for the future. It got me looking at why the code was not working, and I found out I was using ECC_EngineTraceChannel1 instead of ECC_GameTraceChannel1.

All works Now!!

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms