Instantly Move Game Object to position.

When trying to spawn / move my player (has Photon View and Observed Transform View) from a visible holding area into the map I use transform.position = newPos however on other clients. The player drifts into that spot and sometimes gets caught on colliders between the holding area and the map. How can I instantly move the same player from one position to another on all Clients? An RPC? I've tried a couple variations and nothing seems to work.


  • OneManArmyOneManArmy ✭✭✭
    edited November 5
    simply check distance between current and real position.
    If distance is higher than x, then instantly move to real position.

    if(Vector3.Distance(transform.position, correctPos) > 5.0f) transform.position = correctPos;

    if you need example, than download sample project from:
Sign In or Register to comment.