I would like to know what is the best way to get the remote client to say the game object is currently Lerping from point A to point B, and that the game object is not supposed to collide with a clone of itself. Currently, the game object would spaz out when it is moving through another game object.
I was thinking about disabling colliders, but I don’t know how to do so in [Command] and [ClientRPC].
Here’s what it looks like:

And here’s what my network code shows:
[Command]
public void CmdSplit(GameObject obj) {
//This is profoundly one of the hardest puzzles I had tackled. Non-player object spawning non-player object.
//Instead of the usual spawning design used in the Spawner script, the spawning codes here are swapped around.
//In Spawner, you would called on NetworkServer.SpawnWithClientAuthority() in the [ClientRpc]. Here, it's in [Command].
//I am guessing it has to do with how player objects and non-player objects interact with UNET.
GameObject split = MonoBehaviour.Instantiate(this.gameUnitPrefab) as GameObject;
split.transform.position = obj.transform.position;
NetworkIdentity managerIdentity = this.GetComponent<NetworkIdentity>();
NetworkServer.SpawnWithClientAuthority(split, managerIdentity.clientAuthorityOwner);
float angle = UnityEngine.Random.Range(-180f, 180f);
RpcSplit(obj, split, angle);
}
[ClientRpc]
public void RpcSplit(GameObject obj, GameObject split, float angle) {
//We do not call on NetworkServer methods here. This is used only to sync up with the original game unit for all clients.
//This includes adding the newly spawned game unit into the Selection Manager that handles keeping track of all game units.
GameUnit original = obj.GetComponent<GameUnit>();
GameUnit copy = split.GetComponent<GameUnit>();
Copy(original, copy);
NavMeshAgent originalAgent = obj.GetComponent<NavMeshAgent>();
originalAgent.ResetPath();
NavMeshAgent copyAgent = copy.GetComponent<NavMeshAgent>();
copyAgent.ResetPath();
this.splitGroupList.Add(new SplitGroup(original, copy, angle));
if (this.selectionManager == null) {
GameObject[] objs = GameObject.FindGameObjectsWithTag("SelectionManager");
foreach (GameObject select in objs) {
SelectionManager manager = select.GetComponent<SelectionManager>();
if (manager.hasAuthority) {
this.selectionManager = manager;
}
}
}
this.selectionManager.allObjects.Add(split);
}
And the update code:
public void Update() {
this.ownerUnit.isSelected = false;
this.splitUnit.isSelected = false;
//Known Bug: When splitting, the local client will have smooth transitions, but the remote clients will see stuttering animations caused by
//constant updates to the NavMeshAgent.
//If it's a bug that I couldn't fix, then make it a feature!
//Making splitting animations an obvious cue for the players to see.
Vector3 pos = Vector3.Lerp(this.origin, this.origin + this.rotationVector, this.elapsedTime);
if (this.ownerUnit == null || this.ownerUnit.gameObject == null) {
this.elapsedTime = 1f;
return;
}
this.ownerUnit.gameObject.transform.position = pos;
pos = Vector3.Lerp(this.origin, this.origin - this.rotationVector, this.elapsedTime);
if (this.splitUnit == null || this.splitUnit.gameObject == null) {
this.elapsedTime = 1f;
return;
}
this.splitUnit.gameObject.transform.position = pos;
}
public void UpdateSplitGroup() {
if (this.splitGroupList != null && this.splitGroupList.Count > 0) {
for (int i = 0; i < this.splitGroupList.Count; i++) {
SplitGroup group = this.splitGroupList[i];
if (group.elapsedTime > 1f) {
group.Stop();
if (group.splitUnit != null && !this.selectionManager.allObjects.Contains(group.splitUnit.gameObject)) {
this.selectionManager.allObjects.Add(group.splitUnit.gameObject);
}
if (!this.selectionManager.allObjects.Contains(group.ownerUnit.gameObject)) {
this.selectionManager.allObjects.Add(group.ownerUnit.gameObject);
}
this.removeList.Add(group);
}
else {
//Some weird C# language design...
group.Update();
group.elapsedTime += Time.deltaTime / 3f;
this.splitGroupList[i] = group;
}
}
}
if (this.removeList != null && this.removeList.Count > 0) {
foreach (SplitGroup group in this.removeList) {
this.splitGroupList.Remove(group);
}
this.removeList.Clear();
}
}
If more information is requested, I’ll provide as much as possible.