cinnamonrolls

  • 15 ago 2022
  • Si è iscritto 29 giu 2022
  • I am trying to figure out how to achieve this exact effect: https://gfycat.com/thunderousimpishblacknorwegianelkhound

    I believe that the trees are all rigged up in the same way, and have an animation that bends them from one extreme to the next. Then, based on the user's swipe or pan velocity, they sway to the right or left a certain degree.

    Would anyone be able to provide some insight into roughly how this effect might be achieved with Spine? Is it possible to dynamically figure out how far and how much something can bend, and if so, how?

  • Hi Nate,

    Thanks for the reply. I think the API is excellent. The problem is that when I used that property, it's throwing an error.

    'Animation' does not contain a definition for 'name' and no accessible extension method 'name' accepting a first argument of type 'Animation' could be found (are you missing a using directive or an assembly reference?)

    I checked the type of object that var animation = data.FindAnimation("Interaction"); is, and it's a Spine.Animation.

    So this should work, but doesn't.

    EDIT: So, this is case sensitive. The problem is that in the API, it shows lowercase "name" to get the name, whereas the actual codebase references "Name." Not sure why there is that difference.

  • Hi there,

    How do I get the name of an Animation?

    var stateData = skeletonAnimation.SkeletonDataAsset;
     var data = stateData.GetSkeletonData(false);
     var animation = data.FindAnimation("Interaction");
    
    

    I can do the above to find var animation. But from "animation", how do I now go back and find the animation name? I can't do "animation.name" to access that read-only property, although according to the API, it should work.