Sound.direction readwrite


Get or set the sound direction in the world

Example

--! luart-extensions import audio local console = require "console" local sound = audio.Sound("music.mp3") local function printvector(v) -- Fancy Formatting console.writecolor("brightwhite", "Sound "..v..(#v < 7 and ":\t\t" or " :\t")) local value = "{ " for axis, val in pairs(sound[v]) do value = value..axis.." = "..val..", " end value = value:gsub(", $", " }") console.writecolor("cyan", value.."\n") end -- Get default listener position, direction, veolocity, worldup and cone printvector("position") printvector("direction") printvector("velocity") printvector("cone")