mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
feature(NetworkTransform): ServerTeleport() function (#3899)
Co-authored-by: mischa <info@noobtuts.com>
This commit is contained in:
parent
a00db9fe85
commit
1e94e12150
@ -345,6 +345,14 @@ public void RpcTeleport(Vector3 destination, Quaternion rotation)
|
||||
OnTeleport(destination, rotation);
|
||||
}
|
||||
|
||||
// teleport on server, broadcast to clients.
|
||||
[Server]
|
||||
public void ServerTeleport(Vector3 destination, Quaternion rotation)
|
||||
{
|
||||
OnTeleport(destination, rotation);
|
||||
RpcTeleport(destination, rotation);
|
||||
}
|
||||
|
||||
[ClientRpc]
|
||||
void RpcResetState()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user