Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Matrix4x4.Scale

static function Scale(v: Vector3): Matrix4x4;
static Matrix4x4 Scale(Vector3 v);
static def Scale(v as Vector3) as Matrix4x4

Description

Creates a scaling matrix.

Returned matrix is such that scales along coordinate axes by a vector v. The matrix looks like this:

	v.x 0   0   0
	0   v.y 0   0
	0   0   v.z 0
	0   0   0   1

See Also: TRS function.