Navid.64
7 months agoStart Partner
How to make an entity follow the player smoothly without network lag?
I'd appreciate any help with this:
I want an entity to follow the player smoothly without network lag, as smoothly as if it were attached to the player but without using the attachToPlayer method.
Right now, I’m updating the follower’s position in World.onUpdate or World.onPrePhysicsUpdate using either a local or server script, but the follower consistently trails behind the player with an inconsistent lag. Setting the owner also didn't help.
If you want smooth movement, you should use lerp instead of just setting the position every frame. Also, if it is in edit mode it may not look as smooth as it would be in preview/publish mode.