Difference between revisions of "love.audio.setPosition"

(Added a lot more information on the parameters.)
(Removed inaccurate remark about WAV files being imported as stereo and not working correctly.)
 
(5 intermediate revisions by 4 users not shown)
Line 6: Line 6:
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
{{param|number|x|The x position of the listener. This sets where sound occurs on the user's speakers. If you want to select either speaker, a value of 1 to -1 will do. If the value is 1 it will play on the left, if 0 the sound will be centered, if -1, the sound will play on the right. If it is over or under these values, the sound will get softer.}}
+
{{param|number|x|The x position of the listener.}}
{{param|number|y|The y position of the listener. This has control over how loud the sound is. If the number is over or under 1 or -1, then the sound will get softer.}}
+
{{param|number|y|The y position of the listener.}}
{{param|number|z|The z position of the listener. Think of this as how far away a sound is. This also has control over how loud the sound is. If the number is over or under 1 or -1, then the sound will get softer.}}
+
{{param|number|z|The z position of the listener.}}
 
=== Returns ===
 
=== Returns ===
 
Nothing.
 
Nothing.
 
== See Also ==
 
== See Also ==
 
* [[parent::love.audio]]
 
* [[parent::love.audio]]
 +
* [[Source:setPosition]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Sets the position of the listener.}}
 
{{#set:Description=Sets the position of the listener.}}
 +
{{#set:Since=000}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.audio.setPosition}}
 
{{i18n|love.audio.setPosition}}

Latest revision as of 20:57, 18 December 2018

Sets the position of the listener, which determines how sounds play.

Function

Synopsis

love.audio.setPosition( x, y, z )

Arguments

number x
The x position of the listener.
number y
The y position of the listener.
number z
The z position of the listener.

Returns

Nothing.

See Also


Other Languages