Hmm. Maybe I have my character set up incorrectly, or I’m interpreting what I’m seeing incorrectly. What I"m observing is that if I draw a capsule at the CapsuleComponentLocation, and another at the VRLocation, the former appears at the center of the tracking volume, while the latter appears at the location of my HMD:
// draw capsule location & size
const FVector& CapsuleComponentLocation{ GetCapsuleComponent()->GetComponentLocation() };
const FRotator& CapsuleComponentRotation{ GetCapsuleComponent()->GetComponentRotation() };
DrawDebugCapsule(
GetWorld()
, CapsuleComponentLocation
, GetCapsuleComponent()->GetScaledCapsuleHalfHeight()
, GetCapsuleComponent()->GetScaledCapsuleRadius()
, CapsuleComponentRotation.Quaternion()
, FColor::White);
DrawDebugCapsule(
GetWorld()
, GetVRLocation()
, VRRootReference->GetScaledCapsuleHalfHeight()
, VRRootReference->GetScaledCapsuleRadius()
, VRRootReference->GetComponentRotation().Quaternion()
, FColor::Magenta);
So what’s happening is when the CapsuleComponentLocation overlaps a damage trigger, the player takes damage, even though the VRLocation is not overlapping the damage causer. So basically the player takes damage when the center of the tracking volume hits a hazard, rather than when their own perceived location does.
Am I thinking about incorrectly?
Thanks for looking at with me!