I have recently found this breakdown on artstation for getting a similar camera to Mario Odyssey. And after researching I haven’t been able to find any documentation about this problem.
I have slowly been implementing his C++ code and solutions using blueprints but I am having trouble with moving the camera along the arm when its a thick object and not moving when its a thin object.
I know I could setup different collider channels and do it on a per object basis but I would much rather just make a system for the camera that works with any environment like in the breakdown.
My current code is to do a sphere trace from the camera and if the distance from the hit and the camera is < 100 units then I do another trace from the player and move the camera to that new hit on the other side of the wall. My math here seems wrong and the camera isn’t moving along its forward vector and I know its not what the original theory is and I need help understanding it.
Here is my current code:
I’d really appreciate any help or insight on this as I have been searching for the past few days.