Hi!
I try to build a tool to create a modulate mesh. It basically snaps one mesh to another and I can do some other things with it. But I have a problem when I try to build a curve. The rotation value gets changed. In my code I pass the value 270°, but my mesh gets rotated to -90°. This is not a big deal, but for my next curve I add the next 90 degrees, which results wrong. The previous 90 degree rotations work fine. 0 + 90 = 90. 90 + 90 = 180. But suddenly 180 + 90 = -90 for the engine.
The funny thing is, that in the editor it is even not possible to give the rotation a negative value. It is clamped from 0 to 360.
//...some math
//rotZ is 270 during debugging
someActor->SetActorLocationAndRotation(location, FRotator(0, rotZ, 0));
I pass 270 to the function but the result is -90 (see image)
Has anybody any idea why this happens?
Thank in advance!
PS: I’m not in Game Mode. My code is executed in virtual void OnConstruction(const FTransform& Transform).