Description

The FSceneView::Deproject function calls FMatrix::TransformVector4 and passes an FPlane value. TransformVector4 takes in an FVector4 parameter, so the value being passed is implicitly converted to FVector4. However, the conversion process first converts the FPlane to FVector, and then converts the FVector to FVector4. In this process, the W component of the original FPlane is lost.

It may be better to either create and pass an FVector4 value in this case (so no implicit conversion is needed), or to make FPlane(const FVector4&) explicit.

Steps to Reproduce
  1. Locate the SceneView.cpp file in source code.
  2. Locate the FSceneView::Deproject function (line 1084 in 4.17.2).

RESULT:
In the call to TransformFVector4, an FPlane is created and passed to the function. TransformFVector4 takes an FVector4 parameter, so this call results in an implicit conversion from FPlane to FVector to FVector4, and the W component of the FPlane is lost.

EXPECTED:
The W component is correctly included in the parameter received by the TransformFVector4 function.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-53721 in the post.

2
Login to Vote

Won't Fix
ComponentUE - Foundation - Core
Affects Versions4.16.34.17.24.20
CreatedJan 3, 2018
ResolvedAug 18, 2021
UpdatedAug 18, 2021
View Jira Issue