I’ve been working on a gamemode/map that revolves around picking up, carrying, and launching a ball with the physcannon. It’s sort of like dodgeball but when a player is hit with the ball they’re teleported away.
The issue I’m having is that when a client side player is holding the ball, it can be a bit laggy and glitchy. I originally had a func_physbox sphere to use as the ball but have recently replaced it with a custom model hoping that a prop would be less expensive to render, but it’s still having the same problem. Even using prop_physics_multiplayer doesn’t seem to make a difference.
Here’s why it may be lagging, there’s a ton of entities parented for the ball, both for visual interest and game mechanics.
I have 2 env_lightglows parented, an env_smoketrail, 2 trigger teleports, one trigger_multiple, and some env_sparks parented to it. I’m pretty sure the smoketrail is a fairly cheap effect, but I’m curious if anyone knows how expensive the env_lightglow is.
The ball isn’t laggy while in the air or rolling, just when a player is holding it. When testing in single player or hosting a server on the same computer, the host isn’t affected by the lag/glitches.
I’ve tried doing some research into this, but can’t find a solution to this particular set of variables.