A new feature I created. I use it for beards and pigtails of bigger characters. Might be fit for lianes and other stuff also, might it not?

    Testing the Giant’s hair physic with telekinetic spells…

    I used it on bigger characters like giants. Yes, giants might be big enough in this context.

    Chain of SpringJoints + SpriteShapeController + lots of custom code

    A brief How-to

    • Code:
      • SpriteShapeSkeleton – a way I invented to update SpriteShape splines at runtime from any bone structure
      • ShakyJoint – a custom joint that has an anchor and oscillates around that in a customizable area. (a SpringJoint may also do the trick)
      • Any utility methods to fastly set up the needed game object hierarchies, the required behaviours – and to configure them
    • Graphic:
    • Assets in project / scene
      • Beard SpriteShape
      • Chain of game objects linked together

    To describe it simply, the feature consists of a joint list with an anchor that is fixed to an object, which may be a bodypart of an animated object. At runtime, the anchor is moved and the joints shall follow dynamically the anchor. Or physical force is applied to the joints, and hence they move, and they go back when the physical force wanes. Whenever there is a change to the position of the joints, the sprite shape controller has to be adjusted as well (Update method!).

    To make the SpriteShape beard texture stretch over multiple vertices and to avoid breaking into repeating of the beard texture, each vertice should have the tangent mode “Continuous” – and the sprite shape should not stretch too long. The sprite shape profile needs to specify only one border graphic. The SpriteShape game object receives the sprite shape skeleton behaviour and will have the joint game objects as their children.

    An when using joints of Unity’s Physic engine, they can stay within the game object of the moving model. But in my case, whereas I used a custom joint, I had to move the joints out of the object at runtime. Otherwise, the joints would simply have moved together with the anchor game object the joints were attached to.

    Early test

    In this early test I attached a long beard to a barrel and let the main character move it around the scene with help of telekinesis. An action of a mad man for most people. Erm…. but… I – uhm – I am a game developer, so I do such things on a regular basis. It made totally sense back then, I assure you that.

    Slartibartfass – I leave it at that, since I find no words to explain why the whole beard consisted of barrels in the beginning. After all, it may very well be that every dream starts with beards made out of barrels and that is just the way things evolve naturally.

    When the fine-grained configuration of the joint physics was done, I attached a copy of that beard to one of my animated 2D characters – the Ice Giant™. It was okay for the moment.

    The beard physics in the following animated graphics is absolutely dynamic and is determined by the movement of the animated bodypart (head).

    As you can see, the beard is not not moving into the running direction when the character brakes. Currently, the feature lacks the ability to apply movement momentum, but that is not too important for the feature in general. So I could also add that at a later point of development.

    Feature done!

    But be aware of the fact that the logic that adjust the spline of the sprite shape controller is not so trivial, since tangents have to be calculated. Maybe in future, I will share the code for the SpriteShapeSkeleton that does achieve that.


    Image sources: Yves Scherdin, Screenshots from UnityEditor (2026)