@Pentacles FYI: We have just pushed a commit to the 4.2-beta branch which replaces the ApplyTranslationToPhysics
and ApplyRotationToPhysics
bool properties (and their Inspector counterparts Transform Translation
and Transform Rotation
) with Vector2
and float
scale-factor properties. This covers disabling the feature by setting the factors to 0.
A new spine-unity 4.2-beta unitypackage is available for download as well:
https://esotericsoftware.com/spine-unity-download#spine-unity-4.2-beta
From the changelog:
PhysicsConstraints: bool properties ApplyTranslationToPhysics
and ApplyRotationToPhysics
were changed to Vector2 PhysicsPositionInheritanceFactor
and float PhysicsRotationInheritanceFactor
to allow the Transform movement the be scaled by a factor before being applied to the skeleton. You can set the properties to Vector2.zero
and 0
respectively to disable applying any Transform movement at all. The Advanced
Inspector section Physics Constraints
was renamed to Physics Inheritance
, the properties in the section are now called Position
and Rotation
.
PhysicsConstraints: Skeleton GameObjects now automatically apply Transform translation and rotation to the skeleton's PhysicsConstraints
. You can disable applying translation or rotation at the Skeleton component Inspector under Advanced - Physics Inheritance
by setting Position
to (0,0)and Rotation
to 0, or by setting the properties physicsPositionInheritanceFactor
to Vector2.zero
and physicsRotationInheritanceFactor
to 0
at the skeleton component via code.
I would recommend you to back up your current project and update early if possible, since the property changes are breaking changes. In other words, you need to re-configure any of your custom Transform Physics Inheritance settings (either disabled or using a strength modifier other than 1), since the old bool parameter no longer exists and your own parameter is likely named differently. And it's better to do it early than late where you might then need to re-do more configuration work.
If you want to migrate your own strength modifier parameter, you can add
[UnityEngine.Serialization.FormerlySerializedAs("yourTranslationModifierVariableName")]
before the line
[SerializeField] protected Vector2 physicsPositionInheritanceFactor = Vector2.one;
in SkeletonRenderer.cs
and the same for physicsRotationInheritanceFactor
before opening your scenes (or before opening Unity at all). Then you should not loose any of your settings.
@Jamez0r Pinging you here as well just in case you've already updated to the previous package, so that you can avoid losing any settings as well.
The documentation page will be updated accordingly very soon as well.
Hope you like it 🙂.