:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/4.1/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/4.1/doc/classes/PropertyTweener.xml. .. _class_PropertyTweener: PropertyTweener =============== **Inherits:** :ref:`Tweener` **<** :ref:`RefCounted` **<** :ref:`Object` Interpolates an :ref:`Object`'s property over time. .. rst-class:: classref-introduction-group Description ----------- **PropertyTweener** is used to interpolate a property in an object. See :ref:`Tween.tween_property` for more usage information. \ **Note:** :ref:`Tween.tween_property` is the only correct way to create **PropertyTweener**. Any **PropertyTweener** created manually will not function correctly. .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :ref:`PropertyTweener` | :ref:`as_relative` **(** **)** | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :ref:`PropertyTweener` | :ref:`from` **(** :ref:`Variant` value **)** | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :ref:`PropertyTweener` | :ref:`from_current` **(** **)** | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :ref:`PropertyTweener` | :ref:`set_delay` **(** :ref:`float` delay **)** | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :ref:`PropertyTweener` | :ref:`set_ease` **(** :ref:`EaseType` ease **)** | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :ref:`PropertyTweener` | :ref:`set_trans` **(** :ref:`TransitionType` trans **)** | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PropertyTweener_method_as_relative: .. rst-class:: classref-method :ref:`PropertyTweener` **as_relative** **(** **)** When called, the final value will be used as a relative value instead. \ **Example:**\ :: var tween = get_tree().create_tween() tween.tween_property(self, "position", Vector2.RIGHT * 100, 1).as_relative() #the node will move by 100 pixels to the right .. rst-class:: classref-item-separator ---- .. _class_PropertyTweener_method_from: .. rst-class:: classref-method :ref:`PropertyTweener` **from** **(** :ref:`Variant` value **)** Sets a custom initial value to the **PropertyTweener**. \ **Example:**\ :: var tween = get_tree().create_tween() tween.tween_property(self, "position", Vector2(200, 100), 1).from(Vector2(100, 100)) #this will move the node from position (100, 100) to (200, 100) .. rst-class:: classref-item-separator ---- .. _class_PropertyTweener_method_from_current: .. rst-class:: classref-method :ref:`PropertyTweener` **from_current** **(** **)** Makes the **PropertyTweener** use the current property value (i.e. at the time of creating this **PropertyTweener**) as a starting point. This is equivalent of using :ref:`from` with the current value. These two calls will do the same: :: tween.tween_property(self, "position", Vector2(200, 100), 1).from(position) tween.tween_property(self, "position", Vector2(200, 100), 1).from_current() .. rst-class:: classref-item-separator ---- .. _class_PropertyTweener_method_set_delay: .. rst-class:: classref-method :ref:`PropertyTweener` **set_delay** **(** :ref:`float` delay **)** Sets the time in seconds after which the **PropertyTweener** will start interpolating. By default there's no delay. .. rst-class:: classref-item-separator ---- .. _class_PropertyTweener_method_set_ease: .. rst-class:: classref-method :ref:`PropertyTweener` **set_ease** **(** :ref:`EaseType` ease **)** Sets the type of used easing from :ref:`EaseType`. If not set, the default easing is used from the :ref:`Tween` that contains this Tweener. .. rst-class:: classref-item-separator ---- .. _class_PropertyTweener_method_set_trans: .. rst-class:: classref-method :ref:`PropertyTweener` **set_trans** **(** :ref:`TransitionType` trans **)** Sets the type of used transition from :ref:`TransitionType`. If not set, the default transition is used from the :ref:`Tween` that contains this Tweener. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`