Hello!
I have a ledge grabbing system in C++ but I’m just having trouble wrapping my head around how to offset from the wall accounting for the direction the wall is facing.
The blue debug sphere is my MountLocation, and I’m trying to move it further off the wall.
MountLocation = FVector(
WallTraceImpactPoint.X,
WallTraceImpactPoint.Y,
LedgeTraceImpactPoint.Z - (LedgeGrabPointDownOffset)
);
My variables here are named for what they literally are, saved earlier in the class. I’m basically snapping X and Y to where my tracer impacted the wall. If I add or subtract values from these, I can accomplish what I want but only when the wall is facing a specific direction. I’m not good with math and feel like I am missing something obvious here in how to calculate an offset that is relative from those impact points.
Any help would be appreciated, or let me know if I should provide more info on how I’m doing this. I didn’t want to paste the entire class as it’s quite big and figured this may be enough to get the gist of my problem.