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. Dismiss Notice

Question Possible to scale 'top half' of a model different to 'bottom half'?

Discussion in 'Entity Component System' started by kennardconsulting, Feb 10, 2023.

  1. kennardconsulting

    kennardconsulting

    Joined:
    Aug 31, 2022
    Posts:
    5
    Is it possible to scale a model (say, a humanoid) along the y-axis such that its top half (torso) becomes shorter while its bottom half (legs) become longer? So overall the model stays the same height?

    I understand I could do this by directly modifying the mesh. But is it possible to do this to an object overall? Like a scale with a non-centered origin?
     
  2. Jonas_DM_

    Jonas_DM_

    Joined:
    Feb 28, 2019
    Posts:
    22
    I'm pretty sure that'd require multiple meshes or vertex skinning with an animation on the bones.
     
  3. Arnold_2013

    Arnold_2013

    Joined:
    Nov 24, 2013
    Posts:
    262
    As you say you could load the mesh in a 3D modeling program like blender and adjust it (probably the best solution if you always want the model to look like this)

    Splitting the mesh, or using skinned mesh with bones could also work. Like Jonas said.

    Alternatively you could make a shader (with shadergraph) and scale the object depending on the Y-axis object position. And plug this into the vertex stage of the shader.

    Might not be an "ECS" question, so maybe there is a different part of the forum where you could get a better answer.

    There is no beginner friendly methode :)
     
    bb8_1 likes this.
  4. kennardconsulting

    kennardconsulting

    Joined:
    Aug 31, 2022
    Posts:
    5
    Thanks everyone for your replies!