ViewportSprite

Inherits: Node2D < CanvasItem < Node < Object

Category: Core

Brief Description

Displays a viewport as a sprite.

Member Functions

Color get_modulate ( ) const
Vector2 get_offset ( ) const
NodePath get_viewport_path ( ) const
bool is_centered ( ) const
void set_centered ( bool centered )
void set_modulate ( Color modulate )
void set_offset ( Vector2 offset )
void set_viewport_path ( NodePath path )

Description

Used to display a Viewport node at some position in the world, without having to mess with :ref:`RenderTargetTexture<class_rendertargettexture>`s.

Member Function Description

  • Color get_modulate ( ) const

Get color modulation for the texture. All texture pixels are multiplied by this color.

get the offset to the origin of the texture.

Return the path to the shown Viewport node.

  • bool is_centered ( ) const

Return whether the viewport’s texture is centered on the origin.

  • void set_centered ( bool centered )

Set whether the viewport’s texture should be centered on the origin.

  • void set_modulate ( Color modulate )

Set color modulation for the texture. All texture pixels are multiplied by this color. Color may contain rgb values above 1 to achieve a highlight effect.

  • void set_offset ( Vector2 offset )

Set the offset to the origin of the texture.

  • void set_viewport_path ( NodePath path )

Set the path to the shown Viewport node.