Carrying a prop_physics in MP glitchy and laggy

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.

try env_spritetrail instead of env_smoketrail, just use the smoke texture
try env_sprites instead of env_lightglow

sprites are like super cheap

dunno what it could be

have you tried the serverside flag in prop_physics

I haven’t tried the force serverside flag yet, do you think that could help?

I’ll try replacing the glow and trail with sprites to see if it lightens the load. What’s strange is, I left the “e to pick up” option on and when holding the ball with E, it doesn’t freak out like it does with the physcannon. :o/ love troubleshooting.

Thanks for the info!

-snip, rather bad reading-

Still appreciate the input. LOL

Picking up physics props in multiplayer has always been slightly glitchy/laggy due to the server calculating and sending out the position of the prop for everyone over the internet. How out of the ordinary is the lagging? Spawn some other random physics props and try carrying them around. If they’re just as laggy, then it’s not a problem with what you have parented to the ball.

Well, not HORRIBLE, but enough to cause problems. The main issue is that there’s teleporters attached to the ball, they’re brushed just a little bigger than the prop. So when sprinting while holding it with the physcannon, just a tiny lag for a fraction of a second can cause the holder to be teleported. It can be kind of funny, but shouldn’t be happening.

The part that confuses me is that if holding the same object with E, it doesn’t glitch or bounce around like it does with the physcannon.

What about using the gravity gun instead of the physcannon? If that would work for the game, that is.

Thats because the physcannon doesn’t have any prediction to it. Just like the physgun. Which is why the stuttering appears. Not really a way to fix it.