Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How to stretch 2D sprite in a fisheye-type effect using bones?

Discussion in 'Animation' started by anadjurkovic, Apr 4, 2023.

  1. anadjurkovic

    anadjurkovic

    Joined:
    Jan 12, 2022
    Posts:
    2
    Hi I'm new to 2D bone rigging and had a question about non-uniform scaling.

    I have a 2D sprite that lives on a texture sheet (from TexturePacker), and I was wondering, is it possible to scale the sprite from the centre such that the stretching is strongest at the centre, and stretches less towards the edges?

    I drew a little drawing attached here to show what I mean (sprite represented in red). Is there a way I could attach a bone to my sprite to achieve this (in order to animate things like an expanding lung for instance)?

    Thank you!

    https://imgur.com/a/XdVijxN
     

    Attached Files:

  2. anadjurkovic

    anadjurkovic

    Joined:
    Jan 12, 2022
    Posts:
    2
    For those wondering, one solution was to add one bone in the middle to scale via animation, then a few more bones to simply constrain the image at the edges (see image, bones drawn in purple)


    https://imgur.com/a/75TbQlP