
How to play music from a web radio ?
-
- English
- leviking
- Thread is Unresolved
-
-
-
Thank you. It works. But the music doesn't follow the player and remains localized at the starting point.
With an mp3, it's possible to simply play a track (without player.getPosition() ) and have that music as background music. Why doesn't it work with webradio?
-
I believe the method you want to use only supports mono sound.
-
Thank you. It works. But the music doesn't follow the player and remains localized at the starting point.
With an mp3, it's possible to simply play a track (without player.getPosition() ) and have that music as background music. Why doesn't it work with webradio?
Afaik the sound is an asset in a 3D space. So it has to "exist" within this 3D space.
If you create an update loop and then periodically check the position of the player, you can then do a conditional check to see if the player has moved, then if they have moved, move the sound asset to the players new position.
This will make the sound "follow" the player. -
further reading threw the API you can assign null for position.
position - the world position of the sound. Provide null if you want to play this sound as a 2D sound instead (this means the sound has no actual position and can be heard everywhere).
-
Thank you, I found the problem. The sound plays fine, but in position 0 0 0. So it's currently impossible to play a 2D sound but only a 3D sound. I guess it's a bug.
Participate now!
Don’t have an account yet? Create a new account now and be part of our community!