Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/en/workflow/usage_scripting.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ func _on_frame_updated(frame_no: float):

Tracking is driven by the `frame_updated` signal the player emits right after finishing its own update. That is after the part transforms are finalized and before the render phase, so the target updates **within the same frame**. Which process it fires in follows the player's `animation_process_mode` (`Idle` (default) / `Physics`).

Godot's `Transform2D` holds a full 2x3 affine transform, so when `update_position` / `update_rotation` / `update_scale` are **all ON** the transform is assigned whole. That matches the part **exactly, including skew and negative scale**, whether the target sits under the player or in a separate hierarchy.
Godot's `Transform2D` holds a full 2x3 affine transform, so when `update_position` / `update_rotation` / `update_scale` are **all ON** the transform is assigned whole. That matches the part's position, rotation and scale **exactly, including a negative scale (mirror)**, whether the target sits under the player or in a separate hierarchy. A part's **skew is not part of the followed pose**: SpriteStudio treats skew as a per-part vertex deformation that does not inherit to children, so — like a child part — an attachment never receives it.

Turning any of them OFF writes only the enabled components individually, like `RemoteTransform2D`, and skew is not preserved. Only `update_scale` is OFF by default, so **position and rotation alone are reflected out of the box**.
Turning any of them OFF writes only the enabled components individually, like `RemoteTransform2D`. Only `update_scale` is OFF by default, so **position and rotation alone are reflected out of the box**.

> **Turn all three ON when you use `flip_h` / `flip_v`.** A flipped part's pose is a **mirror**, and a mirror can only be expressed as a negative scale. With `update_scale` OFF (the default) the mirror never reaches the target, and **`flip_h` (horizontal) additionally leaves a 180-degree difference in orientation** (`flip_v` does not). The two differ because `Transform2D` decomposes a mirror into a rotation plus a negative scale with the sign placed on the Y axis: a horizontal mirror needs an extra 180-degree rotation to fit that form, and it is the rotation that keeps it. `flip_h` / `flip_v` are not the only source — a part or one of its parents carrying a negative scale in SpriteStudio mirrors the pose the same way.
>
Expand Down
4 changes: 2 additions & 2 deletions docs/ja/workflow/usage_scripting.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ func _on_frame_updated(frame_no: float):

追従は、プレーヤが自身の更新を終えた直後に発行する `frame_updated` シグナルで駆動されます。パーツの変換が確定した後・描画の前なので、追従先は**同じフレーム内**で更新されます。どのプロセスで発火するかは、プレーヤの `animation_process_mode`(`Idle`(既定)/ `Physics`)に従います。

Godot の `Transform2D` は 2×3 のアフィン変換をそのまま保持できるため、`update_position` / `update_rotation` / `update_scale` が**すべて ON** のときは変換を丸ごと代入します。この場合は**せん断(Skew)や負のスケールも含めて厳密に一致**し、対象をプレーヤの子に置いても別階層に置いても差はありません。
Godot の `Transform2D` は 2×3 のアフィン変換をそのまま保持できるため、`update_position` / `update_rotation` / `update_scale` が**すべて ON** のときは変換を丸ごと代入します。この場合はパーツの位置・回転・スケールに**負のスケール(鏡像)も含めて厳密に一致**し、対象をプレーヤの子に置いても別階層に置いても差はありません。なお、パーツの**せん断(Skew)は追従する姿勢には含まれません**。SpriteStudio はせん断を「子に伝搬しないパーツ単位の頂点変形」として扱うため、子パーツと同様、追従ノードにもせん断は渡りません

1 つでも OFF にすると、`RemoteTransform2D` と同じく有効な成分だけを個別に書き込むため、せん断は保持されません。既定は `update_scale` のみ OFF なので、**既定では位置と回転だけが反映されます**。
1 つでも OFF にすると、`RemoteTransform2D` と同じく有効な成分だけを個別に書き込みます。既定は `update_scale` のみ OFF なので、**既定では位置と回転だけが反映されます**。

> **`flip_h` / `flip_v` を使う場合は 3 つとも ON にしてください。** 反転したパーツの姿勢は**鏡像**で、鏡像は負のスケールとしてしか表せません。`update_scale` が OFF(既定)だと対象に鏡像が伝わらず、さらに **`flip_h`(左右反転)では向きに 180 度の差が残ります**(`flip_v` では残りません)。左右と上下で違うのは、`Transform2D` が鏡像を「回転+負のスケール」に分解する際に符号を Y 軸側へ載せるためで、左右の鏡像はこの形にするのに余分な 180 度回転を必要とし、それが回転側に残ります。鏡像になるのは `flip_h` / `flip_v` を使ったときだけではなく、SpriteStudio 側でパーツやその親に負のスケールが付いている場合も同じです。
>
Expand Down
2 changes: 1 addition & 1 deletion ss_player/SpriteStudio-SDK
Loading