Skip to main content

Texture flickering flashing between two different rotations each frame

Possibly due to how Luna recalculates rotations. For example, if a rotation is being applied to the Z axis in Unity, the X axis will also have its values changed as the rotation happens. Then on the next frame the X axis has a new value, the rotation get applied to the Z axis again, which in turn causes the X axis to snap back to its original rotation. This switching happens which frame between the two rotations and therefore flickering occurs.

Possible solution:

  • In Unity, set the game object to the the correct rotation before runtime. For example, if a spinning crosshair image needs to lie flat on the a grass surface during gameplay, then ensure that the crosshair is also flat on the surface in the scene before runtime. You can then apply a the spinning rotation to a different axis.

    Also try setting the rotation values to 0 in the Unity scene before runtime, and only rotating the one axis needed to turn.

    Incorrect setup in scene (before runtime):

images-medium

Correct setup in scene (before runtime):

images-medium