Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

Why is the GameObject return to 0,0 position

$
0
0
When I use the NetworkTransform module attached to the GameObject all works well but when i use this script instead, the object returns to position 0,0, were it was spawned after drag.

Here is the code i use (from a tutorial):

Code (CSharp):
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityEngine.Networking;
  4.  
  5. public class SyncPos : NetworkBehaviour {
  6.  
  7.     [SyncVar] private Vector3 syncPos;
  8.     Transform myTransform;
  9.     [SerializeField] float lerpRate = 15;
  10.  
  11.     void Start() {...
Why is the GameObject return to 0,0 position

Viewing all articles
Browse latest Browse all 16796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>