I’m trying to add the ability to crouch to VR and I came up with the idea to use a LineTrace to find the current distance to the first mesh below the VR Character. However, for some reason when the distance to the ground exceeds 200 units it loops back around to 0. For example, if the headset is 204 units above the ground it displays that the distance to the ground is only 4.
If everyone in the world was the same height this wouldn’t be a challenge, but being able to dynamically tell if the player is crouching seems important.
Any Ideas?
This picture shows how the current position is at 204, but the distance output from the LineTraceByChannel is returning a value of 4. (the numbers are a little different because I had to take multiple screenshots and was holding the HMD with one hand)
PS, I’m new to using BP to set up functions and welcome any tips & tricks.