3D Lingo Dictionary > E-K > insertOverlay |  |

insertOverlay

Syntax

    sprite(whichSprite).camera{(index)}.insertOverlay(index, texture, locWithinSprite, rotation)
    member(whichCastmember).camera(whichCamera).insertOverlay(index, texture, locWithinSprite, rotation)

Description

3D camera command; adds an overlay to the camera's list of overlays at the position indicated by the `index` parameter. The overlay is displayed in the 3D sprite at `locWithinSprite` with the indicated `rotation`. The `locWithinSprite` parameter is a 2D loc measured from the upper left corner of the sprite.

Example

The first line of this example creates a texture named Cedar. The second line inserts that texture at the first position in the list of overlays of the camera of sprite 5. The overlay is positioned at the point (300, 120), measured from the upper left corner of the sprite. It is rotated 45°.

    t1 = member("scene").texture("Cedar")
    sprite(5).camera.insertOverlay(1, t1, point(300, 120), 45)

See also

`removeOverlay`, `overlay`, `backdrop`