Hi, I'm experimenting in Spine/Unity to have a character stand on a branch. As they walk along, the branch bends more and more.
There is a running Spine "Idle" animation on the tree/branch with leaves and branches moving.
Specify a bone in a link of bones (on a branch, vine, tentacle) and start translating (additive/local) or rotating (additive/local) the specified bone, and also have set number of parent bones, to be influenced (with a fall-off) as well.

I'd like a general code method, that I could add the script in Unity to any Spine skeleton game object, give it a bone, and then specify how many bones and the fall off influence going down the bones.

I'm fine with coding this--trying to, but I've not had perfect luck so far.

My current solution is not generalized and needs a lot of extra art support.
I'm using a Transform Constraint for any branch I want the player to stand on, then I have the transform constraint use the RotateMix (local), that uses 0 to 1, based on how far along the branch, the player is standing.
It is okay, but I'm looking for something with less work in the art pipeline.

I've looked at BoneLocalOverride, but it completely overrides the bone rotation from the animation, and I'd like keep this as "local rotations" to each bone.

What is the best path to proceed?
Should I keep looking at modifying BoneLocalOverride, or some other direction?
Can I get this to work, but not expect the underlying animation to affect the bones I'm modifying?
Thank you!


Here are some pictures, to follow up illustrate what I'm trying to do, and I'm asking what would be the best direction to pursue this in Spine/Unity.
In the first picture, the tree would be animating, blowing in the wind, the player is falling towards it.


In the second picture, the player falls somewhere on the tree.
In the code, I will detect what bone it hits.
I want to take that bone, and a series of parent bones, and rotate them a bit, locally left or right, to bend the tree branch (or any other vine thing I'd like).

As I mentioned, I have this working with TransformConstraints, but I wanted to know if there was a better way to generically grab bones and move them locally, to add on top of animation movements.


-Update 2
I've been doing tests, and so far, I'm getting better looking, more reliable results from a nice animation and a transform constraint that changes based on how far along the branch you are standing.

I started using SkeletonUtility scripts and bone chains with hinge2Ds generated, and while it makes great results for 'true vines", I had trouble getting it to look better, for a more rigid branch with lots of various leaf areas.
I'm thinking of still using this method though for some new plant, that is a vine with leaves on it, as the dangling, swinging and interacting you can get from all the collision boxes on the different parts could look really cool if the art were designed to make the most of it.
У вас нет необходимых прав для просмотра вложений в этом сообщении.
  • Сообщения: 7


I have just uploaded an updated version of the spine-unity runtime unitypackages containing improved Create 2D/3D Hinge Chain functionality. The previously generated hinge chain setups had some major shortcomings, the new one should fit your needs much better.

You can download it here as usual:
Spine Unity Download

A blog post will follow soon, however you can already start using the feature, I guess you will figure it out anyway.
Please create the hinge chains once more using the new spine-unity runtime version and let us know if it solved your problem in a better way.
Аватара пользователя

  • Сообщения: 1105

Вернуться в Unity