class_interpolatedcamera.rst 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the InterpolatedCamera.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_InterpolatedCamera:
  6. InterpolatedCamera
  7. ==================
  8. **Inherits:** :ref:`Camera<class_Camera>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Camera which moves toward another node.
  13. Properties
  14. ----------
  15. +---------------------------------+-----------------------------------------------------------+--------------+
  16. | :ref:`bool<class_bool>` | :ref:`enabled<class_InterpolatedCamera_property_enabled>` | false |
  17. +---------------------------------+-----------------------------------------------------------+--------------+
  18. | :ref:`float<class_float>` | :ref:`speed<class_InterpolatedCamera_property_speed>` | 1.0 |
  19. +---------------------------------+-----------------------------------------------------------+--------------+
  20. | :ref:`NodePath<class_NodePath>` | :ref:`target<class_InterpolatedCamera_property_target>` | NodePath("") |
  21. +---------------------------------+-----------------------------------------------------------+--------------+
  22. Methods
  23. -------
  24. +------+--------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`set_target<class_InterpolatedCamera_method_set_target>` **(** :ref:`Object<class_Object>` target **)** |
  26. +------+--------------------------------------------------------------------------------------------------------------+
  27. Description
  28. -----------
  29. InterpolatedCamera is a :ref:`Camera<class_Camera>` which smoothly moves to match a target node's position and rotation.
  30. If it is not :ref:`enabled<class_InterpolatedCamera_property_enabled>` or does not have a valid target set, InterpolatedCamera acts like a normal Camera.
  31. Property Descriptions
  32. ---------------------
  33. .. _class_InterpolatedCamera_property_enabled:
  34. - :ref:`bool<class_bool>` **enabled**
  35. +-----------+----------------------------------+
  36. | *Default* | false |
  37. +-----------+----------------------------------+
  38. | *Setter* | set_interpolation_enabled(value) |
  39. +-----------+----------------------------------+
  40. | *Getter* | is_interpolation_enabled() |
  41. +-----------+----------------------------------+
  42. If ``true``, and a target is set, the camera will move automatically.
  43. .. _class_InterpolatedCamera_property_speed:
  44. - :ref:`float<class_float>` **speed**
  45. +-----------+------------------+
  46. | *Default* | 1.0 |
  47. +-----------+------------------+
  48. | *Setter* | set_speed(value) |
  49. +-----------+------------------+
  50. | *Getter* | get_speed() |
  51. +-----------+------------------+
  52. How quickly the camera moves toward its target. Higher values will result in tighter camera motion.
  53. .. _class_InterpolatedCamera_property_target:
  54. - :ref:`NodePath<class_NodePath>` **target**
  55. +-----------+------------------------+
  56. | *Default* | NodePath("") |
  57. +-----------+------------------------+
  58. | *Setter* | set_target_path(value) |
  59. +-----------+------------------------+
  60. | *Getter* | get_target_path() |
  61. +-----------+------------------------+
  62. The target's :ref:`NodePath<class_NodePath>`.
  63. Method Descriptions
  64. -------------------
  65. .. _class_InterpolatedCamera_method_set_target:
  66. - void **set_target** **(** :ref:`Object<class_Object>` target **)**
  67. Sets the node to move toward and orient with.