So I'm making a parkour game and before this issue, I've made the character successfully face the wall when it wants to scale the wall.
Anyway, that was for climbing, right now I'm making the second part allowing the player to wall-run which also works fine, the only thing I want to add is to make the character face the wall it's running, but sideways. this works for walls that are rotated -45 degrees, but not on walls in other directions. I'm trying to make this dynamic and I've tried several things.
CFrame_Line:
CFrame.new(
hrp.CFrame.p
,Vector3.new(hrp.Orientation.X
, wallpart.Orientation.Y - rightcastresult.Normal.Y
, hrp.Orientation.Z
)
)
I've tried adding 90 degrees to the CFrame like
Cframe_Line*CFrame.Angles(0,math.deg(90),0)
--or
Cframe_Line*CFrame.Angles(0,math.rad(90),0)
I've tried using RightVector
CFrame.New(Cframe_Line.Position, Cframe_Line.RightVector)
but none proved any different.
right now I have footage of it working on 1 type of wall in a particular direction, and also not working on other wall directions:
Here's how the raycast works and how I want it to work the raycast is set up fine.

1 comment
yes, was able to fix this with front facing walls, did had to make invisible wall parts but i managed to automatically generate those over buildings, still am trying to make this dynamic without invisible parts