No announcement yet.

Why no bReturnFaceIndexOnMove in UPrimitiveComponent?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Why no bReturnFaceIndexOnMove in UPrimitiveComponent?

    UPrimitiveComponent allows you to control several FCollisionQueryParams fields via member variables (e.g., bReturnMaterialOnMove). However, UPrimitiveComponent provides no member variable to set FCollisionQueryParams::bReturnFaceIndex. Because of this, it is not possible to have the FaceIndex set in the FHitResult when the component is moved.

    I created a USphereComponent sub-class that overrode InitSweepCollisionParams and set FCollisionQueryParams::bReturnFaceIndex to true and then was able to get the FaceIndex in the FHitResult on component move.

    I was wondering if this was left out of UPrimitiveComponent intentionally or if it was an oversight. If intentionally, why?

  • replied
    I made a pull request to add this functionality It is straightforward, but I'm curious to know if it was left out on purpose for a reason I'm unaware of.

    Leave a comment: