I want to take the Third Person Blueprint template and simply add the functionality to hide the player model when the camera is too close to the character. I’ve been trying to figure out what value changes when the spring arm compresses (IE collides with a wall) but I can’t for the life of me figure out what it is. I thought the Target Arm Length would be shortening but this value remains the same at all times.
I also tried getting the relative location of the camera but that seems to be 0 at all times. I thought relative location meant it’s location compared to the “zero” of the blueprint so you’d think this value would change when the camera moves closer when colliding with a wall. Very confused.
Any help is greatly appreciated.
Ahh yes, that worked brilliantly! Thank you so much.
The relative position is based on the closest parent, eg if you attach a camera to a scene component it moves relative to that component. If you attach it to the Root, then it will move relative to the “zero” of the blueprint.
I’m not to sure about what is moving when the camera is hitting something, but if the camera is actually changing its position one solution could be to compare the world position of the camera and the world position of the character? If you subtract the Camera position form the character you get a vector between them, then use the Vector Length to determine the offset form the character and branch with float greater then to trigger hide/show event of the character?
Glad I could help!
Don’t forget to mark my answer as resolved and give it an up-vote for others with similar problem easier can find it.