What does InverseTransformVectorNoScale do?

what does InverseTransformVectorNoScale do?

I cant understand by its source code. what is logically meant to do?

Hi,

This function apply inverse transform without scaling the vector. For example, you have transform with scale 10 and rotation on 10 degrees around X-axis. In the result you will achieve vector rotated around X axis on -10 degrees rad.

Here is some example.

Transform transform(FRotator(90, 0, 0), FVector(0, 0, 0), FVector(10, 10, 10));

	FVector r1 = transform.TransformVector(FVector(1, 0, 0)); // 0 0 10   scale in 10 and rotate on 90 degrees
	FVector r2 = transform.InverseTransformVector(FVector(1, 0, 0)); // 0 0 -0.1  scale in 0.1 and rotate on -90 degrees
	FVector r3 = transform.InverseTransformVectorNoScale(FVector(1, 0, 0)); // 0 0 -1   no scale and rotate on -90 degrees

Best regards, Gleb