79437770

Date: 2025-02-13 21:36:13
Score: 0.5
Natty:
Report link

Could it be that the plane you are using is parallel to the XZ plane, while you need it to be parallel to the XY plane?

From Apple's documentation,

planeTransform: The transform used to define the coordinate system of the plane relative to the scene. The coordinate system's positive y-axis is assumed to be the normal of the plane.

The matrix matrix_identity_float4x4 represents the XZ plane. The matrix for the XY plane with normal in the +Z direction should be:

let xyPlaneMatrix = simd_float4x4(
      SIMD4<Float>( 1,  0,  0, 0),
      SIMD4<Float>( 0,  0,  1, 0),
      SIMD4<Float>( 0, -1,  0, 0),
      SIMD4<Float>( 0,  0,  0, 1)
   )
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Thanh Duy Truong