Phaser API Documentation

  Version: 

Member of: Phaser.GameObjects

<static> GetCalcMatrix(src, camera, [parentMatrix])

Description:

Calculates the Transform Matrix of the given Game Object and Camera, factoring in the parent matrix if provided.

Note that the object this results contains references to the Transform Matrices, not new instances of them. Therefore, you should use their values immediately, or copy them to your own matrix, as they will be replaced as soon as another Game Object is rendered.

Parameters:

name type arguments description
src Phaser.GameObjects.GameObject

The Game Object to calculate the transform matrix for.

camera Phaser.Cameras.Scene2D.Camera

The camera being used to render the Game Object.

parentMatrix Phaser.GameObjects.Components.TransformMatrix <optional>

The transform matrix of the parent container, if any.

Returns:
Description:

The results object containing the updated transform matrices.

Examples:
Since: 3.50.0