Player/environment collision in TrueSync?

Hi Photon - really cool project you have here with TrueSync - been waiting for something like this for a while!
I ran through the TrueSync tutorial, no problems. Now I'm trying to put the player controlled boxes into a simple environment. When a player controlled box hits a wall, it should not be able to move in that direction. The two ways that I know of to handle this are "inside the physics system" - IE use velocity, constraints,etc. and "outside the physics system" - IE use raycasts or child colliders to detect when a gameObject is near a wall, and modify a transform position based on that. Since the tutorial uses the latter technique to move players around, I thought the best method would be to continue with that - unfortunately, TSRaycast doesn't seem to be behaving as I'd expect, and a physics based solution seems unwieldy. Been wrestling with this for a few hours now, so my question is this: What is an effective way to build player/environment collision in TrueSync?


Best Answer


  • Hi @TML,

    The way we are using most in our samples and tests is the latter techinique using colliders, but if you have problems with that can you explain more in detail your issues? It will lead us to do improvements on our side. Thanks.
  • TML
    edited January 2017
    Hi @JeffersonHenrique - thanks for the quick response! A few things I've noticed - I was attempting to use a TrueSync collider to detect player collision with the environment, and this would consistently fail to report trigger EXITs reliably, this was a repeatable, reproducible issue here. Tried experimenting with the TrueSync raycaster, but had a whole slew of problems with that not responding as expected - may just be a knowledge gap, but I'm pretty sure I grok'd the source, so not sure.
    Experimenting with switching to native Unity colliders to detect enviro collision today - since movement is in sync, they should basically function exactly the same for all players without needing to sync their detection states, at least that's what I'm hoping.
  • Hi @JeffersonHenrique - sorry for the delayed response, for some reason I'm not getting notifications from the forum. Was 3d physics, simple box colliders :)