Skip to main content

CustomTransform

Overview

Enter 4x4 transform matrix values directly to apply a free-form transform — rotation, skew, and translation combined. For example, use it to combine several transforms at once.

Properties

PropertyDescriptionValueDefault
Transform(Matrix4)Enter a 4×4 transform matrix directly to apply a free-form transform — scaling, translation, rotation, and skew combined. In the Studio editing panel, edit the 16 components in the 4×4 input grid of the Transform(Matrix4) group. Each component's internal property name is arg0 to arg15, in column-major order.16 numbers (arg0 to arg15)Identity matrix (arg0, arg5, arg10, arg15 = 1.0; the rest = 0.0)
alignmentSets the origin point of the matrix transform.Alignment valueCenter
transformHitTestSets whether hit testing uses the transformed position.On / OffOn
filterQualitySets the image quality — the interpolation method — used when rendering the matrix transform.none, low, medium, highNot set

Examples

Transform(Matrix4) fills the 4×4 matrix in column-major order. The 16 components sit in these positions.

| arg0 arg4 arg8 arg12 |
| arg1 arg5 arg9 arg13 |
| arg2 arg6 arg10 arg14 |
| arg3 arg7 arg11 arg15 |

Components you'll use most often:

  • arg0 = horizontal scale (scaleX), arg5 = vertical scale (scaleY)
  • arg12 = horizontal translation (translateX, px), arg13 = vertical translation (translateY, px)

Starting from the default identity matrix, change only the components below.

GoalComponents to set
Scale 2×arg0 = 2.0, arg5 = 2.0
Move 40 right and 20 downarg12 = 40.0, arg13 = 20.0
Scale 2× horizontally and move 40 rightarg0 = 2.0, arg12 = 40.0
Flip horizontallyarg0 = -1.0

From a script, set each component individually by its name (arg0 to arg15).

// 2배 확대 + 오른쪽 40px 이동 (customTransformID = Custom Transform 위젯 ID)
customTransformID.setProperty("arg0", 2.0); // 가로 배율
customTransformID.setProperty("arg5", 2.0); // 세로 배율
customTransformID.setProperty("arg12", 40.0); // 가로 이동
warning

Leaving arg0 or arg5 — the scale components — at 0 makes the widget disappear from the screen. To apply just one transform, start from the identity matrix and change only the components you need.