I saw someone else had this with ureal 4.26 and I seem to be having this issue with 5.5
When I spawn the debug camera (using unreal 4.26), the camera is rotated 90 degrees to the left instead of facing the direction of the character. Moving or rotating the character while playing always ends up with the camera facing to the left.
I thought maybe when we initially had to rotate the mesh to match the arrow component might have something to do with it so I undid that rotation but even then the camera still points to the character’s left, even though the character is then facing righ…
When I run the code in Gun.cpp
DrawDebugCamera(GetWorld(), GetActorLocation(), GetActorRotation(), 90, 2, FColor::Red, true);
The debug camera shows up rotated 90 degrees to the left
Okay so I found out why I think this is happending per another discussion of this issue the mesh is rotated. When I looked at my own it was rotated -90 degrees
So in the c++ code I added a little snippet which may be a bit wasteful on the memory front but I felt it was more readable this way.
FRotator DeltaRotation = FRotator(0.f, 90.f, 0.f);
FRotator OffsetRotation = GetActorRotation() + DeltaRotation;
DrawDebugCamera(GetWorld(), GetActorLocation(), OffsetRotation, 90, 2, FColor::Red, true);
Also here is the previous conversation that tipped me off as to what was happening.
I started to do some digging and found that imported models are using the +Y axis (mostly) to represent forward direction and unreals own components are using forward direction with +X.
My finding are as follows
Imported Asset Rifle: Points forward on the +Y axis for both Global \ Local Axis
[image]
Unreals components: Camera & Spring Arm both points Forward on their +X Global\Local Axis
Imported Asset Skeletal Mesh: Wraith_OD_Green: Points forward on its Global +X axis but also points…
1 Like