| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- return {
- tag = 'listener',
- summary = 'Set the pose of the listener.',
- description = 'Sets the position and orientation of the virtual audio listener.',
- arguments = {
- {
- name = 'x',
- type = 'number',
- description = 'The x position of the listener, in meters.'
- },
- {
- name = 'y',
- type = 'number',
- description = 'The y position of the listener, in meters.'
- },
- {
- name = 'z',
- type = 'number',
- description = 'The z position of the listener, in meters.'
- },
- {
- name = 'angle',
- type = 'number',
- description = 'The number of radians the listener is rotated around its axis of rotation.'
- },
- {
- name = 'ax',
- type = 'number',
- description = 'The x component of the axis of rotation.'
- },
- {
- name = 'ay',
- type = 'number',
- description = 'The y component of the axis of rotation.'
- },
- {
- name = 'az',
- type = 'number',
- description = 'The z component of the axis of rotation.'
- }
- },
- returns = {},
- notes = [[
- The default implementation of `lovr.run` calls this function with the result of
- `lovr.headset.getPose`, so that the listener automatically tracks the headset.
- ]],
- related = {
- 'lovr.audio.setPosition',
- 'lovr.audio.setOrientation',
- 'Source:setPose'
- }
- }
|