#Force the Network Object v2 graphical object to teleport?
16 messages · Page 1 of 1 (latest)
Hi, do the methods mentioned for pv1 work in your case?
https://fish-networking.gitbook.io/docs/manual/guides/prediction/version-1/more/teleporting
I can teleport with this code but the PredictionObject smooths my graphical object which looks odd.
[TargetRpc(RunLocally = true)]
private void OwnerTeleport(NetworkConnection owner, Vector3 position, float yRotation)
{
ClearReplicateCache();
CharacterController.enabled = false;
transform.position = position;
CharacterController.enabled = true;
}
The Enable Teleport options should be able to resolve that I believe, did you try different thresholds?
I did, but enable teleport only cares about distances before deciding whether to smooth or not. So if I die right next to my spawn point ill slide over to it, the higher the teleport threshold the farther from spawn you can be while still sliding over.
Also enabling teleport caused issues for other aspects of my characters, when they get hit they can fly quite a distance before the server updates the owner and it causes them to snap into place which meant enable teleport wasnt a good solution for me
Ah ok, I see
A function on NetworkObject v2 which resets smoothing when called would be perfect.
Also i typoed here, this should be NetworkObject not PredictionObject
I was looking through the files and couldnt find this, should i submit a feature request or something?
Hmm, I'm just looking around to see if FGG added such a feature already or is planning on adding one
I don't see any option either. If you could drop a feature request here that would be appreciated: https://github.com/FirstGearGames/FishNet/discussions
Sure I can do that
Thanks!
And thank you