so i really need some help from someone with more knowledge on the subject since im basically guessing about what I"m doing
the problem is that i have a character that can be rotate in any direction
since it can walk on the wall ceiling floor anything in between.
the problem with this is that controlrotation is assuming that the character is not rotated in any way and standing straight up.
so when applying yaw it would just rotate the character of the wall.
so i need to translate the inputs to be applied in a way so they yaw properly even when on the wall.
this is how far i got but i ran int the problem you call rotor lock i believe where the value only goas from -180 to +180 so when it dous a 360* on the wall the controls get inverted halfway trough and it also kinda glitches out inbetween the transition.
void AFPMMFPlayerCameraManager::ProcessViewRotation(float DeltaTime, FRotator& OutViewRotation, FRotator& OutDeltaRot)
{
if (AFPMMFCharacter* FPMMFCharacter = Cast(GetOwningPlayerController()->GetPawn()))
{
FVector CharacterUpVector = FPMMFCharacter->GetCharacterUpVector();
// Convert OutDeltaRot to a Quaternion
FQuat DeltaQuat = FQuat(OutDeltaRot);
// Create a Quaternion that represents a rotation aligned with the Character's up vector
FQuat UpVectorQuat = FQuat::FindBetweenVectors(FVector::UpVector, CharacterUpVector);
// Use the Quaternion rotation to rotate DeltaQuat
DeltaQuat = UpVectorQuat * DeltaQuat * UpVectorQuat.Inverse();
// Convert the rotated Quaternion back into a Rotator
OutDeltaRot = DeltaQuat.Rotator();
// Add Delta Rotation
OutViewRotation += OutDeltaRot;
OutDeltaRot = FRotator::ZeroRotator;
OutViewRotation.Normalize();
}
}