Blueprint to C++ and Engine Freezing?

You need to overload the == operator for transforms. I’d declare this function in some kind of namespace so you don’t step on other declarations if you encounter any.

FORCEINLINE bool operator==(const FTransform& LTransform, const FTransform& RTransform)
{
	return
		(
			LTransform.ToMatrixNoScale() == RTransform.ToMatrixNoScale()
		);
}

That will compare the orientation and translation of two transforms to decide equivalence

FORCEINLINE bool operator==(const FTransform& LTransform, const FTransform& RTransform)
{
	return
		(
			LTransform.GetLocation() == RTransform.GetLocation()
		);
}

That one will decide equivalence only based off of locations. In which case, if you don’t care about rotations for what you are doing I would just switch now to using FVectors for locations because they already have an == operator :slight_smile: and they have a smaller footprint.

I would declare this in the header of the class that needs it to keep it within a namespace

1 Like