Premium Only Content

Rogue Engine - Playing Sounds - In Two Minutes
Rogue Engine enables you to attach a sound to an object in the scene.
So let's make an empty object and rename it.
We are going to create a new component to start the sound playing so, create a new Component asset and call it, Object Audio.
Now double click the component to open it in your code editor.
We need to reference the Three.js library at the top of the file as we want to add a property to the component that is a Three.Audio type.
The "true" parameter in the property indicates that this will be positional audio so that the sound will seem to come from the object in 3D space.
If we save our code and go back to the Rogue editor, we can drag and drop the component onto the Audio Background object. We will now see the objectAudio property we have defined is "unset".
So lets find some audio to go into this component. You can import an mp3 file into your asset panel and then drag and drop it into the objectAudio property.
Now we can go back to our code. We can make the audio play as soon as the scene is loaded by adding the following to the Start method.
First check that the objectAudio property has been set.
Then add the objectAudio to the object3D that this component is attached to.
We can set the audio to loop if we want to, then play the audio.
Save your code and go back to the Rogue editor. Now when we play our scene, the audio will play.
And that's how to attach audio to an object with Rogue Engine.
-
LIVE
MattMorseTV
2 hours ago $10.77 earned🔴Senate VOTES to RE-OPEN the GOVERNMENT..? 🔴
1,576 watching -
LIVE
The Mel K Show
2 hours agoMORNINGS WITH MEL K - Beware of Those Who Sabotage Peace for Profit - 10-22-25
726 watching -
LIVE
The Shannon Joy Show
2 hours agoThiel Exposed - Breakthrough Cancer Treatments W/ Dr. Makis - Medical Freedom Update W/ Dr. Bowden
330 watching -
8:58
Colion Noir
5 hours agoHe Installed a Forced Reset Trigger at a Gun Range… and Got Arrested | What You Need to Know
27.5K19 -
59:56
Grant Stinchfield
2 hours ago $0.37 earnedKaren Bass Targets ICE — Twists Law to Protect Lawbreakers!
3.14K2 -
LIVE
Outspoken with Dr. Naomi Wolf
1 hour ago"Deceptive Polls, ‘No Kings’ After Action Report, Antifa Targets Journalists"
75 watching -
1:02:10
VINCE
4 hours agoThe Process Is The Punishment, John Brennan Edition | Episode 152 - 10/22/25
158K197 -
LIVE
LFA TV
14 hours agoLIVE & BREAKING NEWS! | WEDNESDAY 10/22/25
3,061 watching -
LIVE
Viss
3 hours ago🔴LIVE - Viss & Dr Disrespect: PUBG 1 Win Minimum & BF 6 Kills Challenge!
71 watching -
1:40:28
Caleb Hammer
5 hours agoI (almost) Gave Up.. | Financial Audit
11.1K