Simple Volumetric Audio by Rylvns

Are you using some sort of vector map module? It could help.

Yes im a scripter

I’m using a chunk system for the attachments which can be edited; in the video I show this. I added this so that attachments arn’t so close together and for “performance” to control the amount of attachments.

I suggest placing attachments in a set “Chunk” Style and then using spatial query for wall detection

1 Like

What is a spatial query? How can I do a spatial query? Does it help with performance? Whats a set “Chunk” style? !!

Spatial Query Documentation

Essentially, Its a a imaginary Vector3 based shape that has functions like “GetPartsInPart”

Its a solution to hitbox or detection methods that use parts (which costs performance). Instead you can just check without instancing anything new.

Hitbox Module Using Spatial Query:
Hitbox.rbxm (8.8 KB)

In most cases, Yes. Vastly. This is because of cuts on memory usage, Math, Creation and deletion, and the new method which actually has decent code (Compared to old functions)

Imagine a box, Lets say i divide this box into sections called “Chunks”. Each chunk is its own independent existence and has its own calculation.

You can split up the box into cubes or spheres. Whatever suits your needs but the idea is that using vectormapping you can split up the cost of operation a ton. By essentially getting rid of something called “Junk Calculation”

“Junk Calculation” is when roblox was about to calculate something that didnt need to be and it has to clean it up. This happens the bigger or more “Heavy” something is.

1 Like

If you dont mind giving me the code for this demo, I can add vector mapping so you dont have to go through that trouble.

1 Like

i really love it! this system works perfectly overall, but i’ve noticed errors.

the functionality seems to be working just fine despite the error.
it only happens in my game, not in your demo place.
if you have any ideas about why this might be happening or how to resolve it, I’d really appreciate your insight.
but again, the system is fantastic, and I’m really enjoying using it. :+1:

I’d recommend using the optimized version. But your error is caused by your sound’s parent not being a basepart. You can add an if statement to check if it is a basepart and skip it to remove this issue.