Listener.xml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="Listener" inherits="Spatial" version="3.4">
  3. <brief_description>
  4. Overrides the location sounds are heard from.
  5. </brief_description>
  6. <description>
  7. Once added to the scene tree and enabled using [method make_current], this node will override the location sounds are heard from. This can be used to listen from a location different from the [Camera].
  8. [b]Note:[/b] There is no 2D equivalent for this node yet.
  9. </description>
  10. <tutorials>
  11. </tutorials>
  12. <methods>
  13. <method name="clear_current">
  14. <return type="void">
  15. </return>
  16. <description>
  17. Disables the listener to use the current camera's listener instead.
  18. </description>
  19. </method>
  20. <method name="get_listener_transform" qualifiers="const">
  21. <return type="Transform">
  22. </return>
  23. <description>
  24. Returns the listener's global orthonormalized [Transform].
  25. </description>
  26. </method>
  27. <method name="is_current" qualifiers="const">
  28. <return type="bool">
  29. </return>
  30. <description>
  31. Returns [code]true[/code] if the listener was made current using [method make_current], [code]false[/code] otherwise.
  32. [b]Note:[/b] There may be more than one Listener marked as "current" in the scene tree, but only the one that was made current last will be used.
  33. </description>
  34. </method>
  35. <method name="make_current">
  36. <return type="void">
  37. </return>
  38. <description>
  39. Enables the listener. This will override the current camera's listener.
  40. </description>
  41. </method>
  42. </methods>
  43. <constants>
  44. </constants>
  45. </class>