Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Resolved Could one flip a sprite in an animation keyframe?

Discussion in 'Animation' started by Heptagram064, Apr 25, 2023.

  1. Heptagram064

    Heptagram064

    Joined:
    Feb 22, 2022
    Posts:
    94
    Hello,

    I was messing around with sprite animations, when i came across the situation of, "Hey, would it not be convenient, if one could flip / mirror individual keyframes?"; upload_2023-4-25_22-4-33.png

    Does anyone know how to do this?

    I'd prefer not to increase my spritesheets for this
     
  2. Yuchen_Chang

    Yuchen_Chang

    Joined:
    Apr 24, 2020
    Posts:
    111
    In sprite renderer, key [Flip X].
    SpriteRenderer-FlipX.png
     
  3. Heptagram064

    Heptagram064

    Joined:
    Feb 22, 2022
    Posts:
    94
    Well that is the problem, Keyframes do not have a sprite renderer to my knowlage? If they do, where could i access them?
     
  4. Yuchen_Chang

    Yuchen_Chang

    Joined:
    Apr 24, 2020
    Posts:
    111
    Just select your GameObject that plays the sprite animation, start recording, then you can key the flip X. (by directly change value of "Flip X" or right click and select "Add key")

    *In Unity, you can key almost every property you can see in the inspector
     

    Attached Files:

  5. Heptagram064

    Heptagram064

    Joined:
    Feb 22, 2022
    Posts:
    94
    Ah, of course. I was trying to make animations without the use of a gameobject. Thank havens animations work on prefabs. Thanks for the answer; upload_2023-4-26_15-10-58.png
     
    Yuchen_Chang likes this.