Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constrained bones do not rotate correctly when Rotation Mix in the Transform constraint is less than 100 #729

Closed
misaki-eymard opened this issue Feb 2, 2023 · 4 comments

Comments

@misaki-eymard
Copy link

Description:
If the Mix value of Rotation is less than 100, the constrained bone will be flipped when the target bone of the transform constraint rotates more than 180 degrees. In other words, the rotation is interrupted as if it suddenly jumped.

Expected behavior:
Even if the target bone rotates more than 180 degrees, the constrained bone is affected according to the percentage of the Mix value for the value of the target bone rotation.

Steps to reproduce:
1.Download and unzip the following zip file:
Constrained bones do not rotate correctly when Rotation Mix is less than 100.zip

2.Open the Spine project in it using Spine v4.1.19, and play the animation.

3.You can see the bone with a transform constraint Rotation Mix value of 100 follow the target bone's rotation perfectly, but the bone with a Mix value of 70 can be seen to flip with respect to the X axis when the target bone rotates more than 180 degrees.

The versions of Spine in which this issue were found:
Spine v4.1.19

This bug was reported on the following forum post:
http://esotericsoftware.com/forum/Rotation-Transform-Bug-18602

@NathanSweet
Copy link
Member

Unfortunately this is how rotation mixing must work. I explained it here. It would be good to include this information in the user guide, if it's not already there.

@JQSpin
Copy link

JQSpin commented Feb 2, 2023

Unfortunately this is how rotation mixing must work. I explained it here. It would be good to include this information in the user guide, if it's not already there.

Please provide an alternative rotation mode/version where it's a percentage of the total rotation it's reading from. It could be a check box like how, Local or Relative are available for some transforms if legacy behavior need to be maintained. It's already difficult to set up certain mechanics as it is without this weird rotation behavior. Version 3 had the worst rotational behavior I've seen in any 3D or 2D software to date, requiring you to use 3 keys for one 360 degree rotation. And now you are saying we can't have another bone rotate, eg 10% of source bones 720 deg = 72 deg without it jumping around. That is just plain non user/creative friendly, it makes certain setups impossible.

@NathanSweet
Copy link
Member

When Local is unchecked, it needs to work like it does. "World rotation" means the direction a bone is pointing, and a bone's world rotation is always in the range of 0-360 degrees. Taking a percentage of a bone's world rotation results in a jump when the bone rotates in a circle. There is no such thing as eg 720 degrees of world rotation.

You can already check Local and Relative to add any percentage of another bone's local rotation without a jump, as @JQSpin described.

When Local is checked and Relative is unchecked, currently we wrap 0-360 degrees. This is a holdover from how rotation worked < 4.0. I don't think there is any longer a good reason to wrap. Removing wrapping changes the constraint behavior, but the jumping is not typically useful so I doubt that anyone is relying on that behavior.

@NathanSweet
Copy link
Member

4.2.60-beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants