mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-08 11:46:53 +08:00
[unity] Use explicit primitive type instead of var.
This commit is contained in:
parent
1d5b62c2fd
commit
4c7a6b6501
@ -138,7 +138,7 @@ namespace Spine.Unity {
|
|||||||
// Recommended setup: Use local transform properties if Spine GameObject is the immediate parent
|
// Recommended setup: Use local transform properties if Spine GameObject is the immediate parent
|
||||||
thisTransform.localPosition = new Vector3(bone.worldX, bone.worldY, followZPosition ? 0f : thisTransform.localPosition.z);
|
thisTransform.localPosition = new Vector3(bone.worldX, bone.worldY, followZPosition ? 0f : thisTransform.localPosition.z);
|
||||||
if (followBoneRotation) {
|
if (followBoneRotation) {
|
||||||
var halfRotation = Mathf.Atan2(bone.c, bone.a) * 0.5f;
|
float halfRotation = Mathf.Atan2(bone.c, bone.a) * 0.5f;
|
||||||
if (followLocalScale && bone.scaleX < 0) // Negate rotation from negative scaleX. Don't use negative determinant. local scaleY doesn't factor into used rotation.
|
if (followLocalScale && bone.scaleX < 0) // Negate rotation from negative scaleX. Don't use negative determinant. local scaleY doesn't factor into used rotation.
|
||||||
halfRotation += Mathf.PI * 0.5f;
|
halfRotation += Mathf.PI * 0.5f;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user