Rubisorange / ZonedVoiceDampening

A VrChat Udon script prefab for custom zoned voice dampening
MIT License
16 stars 1 forks source link

World starts to lag when many people join. #1

Open Garret27 opened 2 years ago

Garret27 commented 2 years ago

World starts to lag when many people join. For starters, my world is pretty optimal. All the lights are baked and reflection probes too. And I don't have pickup objects.

When around 10 people join, there is a noticeable drop in frames. 15-18 total people, the frames drop to 10fps or lower. There is something in the coding that's causing when a certain amount of people arrive.

I had to remove the prefab completely from my world to get everything back to normal.

Rubisorange commented 2 years ago

I have a quick fix that should help with the performance issues. In the "RoomIndicator" script, change the OnPlayerTriggerStay event for a OnPlayerTriggerEnter event. The downside of this change is that you wont be able to use multiple colliders assigned to the same zone and the way trigger colliders work, you need convex shapes.

Rubisorange commented 2 years ago

I updated the prefab with more optimized scripts. I hope this solves your issue.