True Sync Config error

Hi!

I imported the latest version of True Sync and after joining a game via the Menu scene it starts the correct game scene, but there it throws an error.
Every of your demo scenes where the 2D Physics are used, it throws an error in the TrueSyncConfig.cs file. So i had a look and the checkboxes of the LayerCollisionMatrix aren't shown.
The following error is thrown:
IndexOutOfRangeException: Array is out of range.
at line 95:
"return physics2DIgnoreMatrix[matrixIndex];"

Is there something wrong with your current version?

Cheers,
Johannes

Comments

  • Thanks for the report @John05, did you try to import in a fresh project?
  • John05John05
    edited January 2
    @JeffersonHenrique
    Yes, and the same problem occurs there.
    Using Unity 5.5.0f3.

    pasteboard.co/hl892GPfY.png

  • Thanks again @John05, we will check what is going on there.
  • Hey @John05, thanks for your report, I found out what is the problem, those asset files were created from an old version of the TrueSyncConfig. We will fix in the next release (1.0.7), but to fix it you can create a new config asset ("Assets/Create/TrueSyncConfig") and copy the values, this new instance should work fine if you open the collision matrix panel.
  • @JeffersonHenrique Thank you for looking into, that fixed the problem instantly.
  • I just upgraded to Unity 5.5.1 and TrueSync 1.0.8 and now I'm getting the same problem, but not sure how to solve it. Errors are thrown in the editor when expanding the Layer Collision Matrix. I was using Unity 5.4.2 and TrueSync 1.0.7 without trouble. Any help is appreciated.
  • I reset the TrueSyncConfig settings and the Layer Collision Matrix has returned, but now my project behaves very differently in regards to physics. I'm not sure what is going on yet, so I'll continue troubleshooting on my end.
  • Hi @ScriptGeek, are you using 2D physics?
  • KresoKreso
    edited February 18
    There seems to be error in TrueSyncConfigEditor.cs, line 216.
    It is iterating through non-existing array value. If I comment it out error is not there but 2 last layers don't have checkboxes.
    I attached a screenshot, hope it helps.

  • Humm, thanks @Kreso, I will try to reproduce this issue and check why it didn't work well.
  • KresoKreso
    edited February 22
    @JeffersonHenrique
    Perhaps this error happens because there are gaps between layers I have defined (check this screenshot to see what I mean).
  • Interesting @Kreso, thanks for this additional info.
  • @JeffersonHenrique Sorry for being so slow to respond as I've been preoccupied with many distractions that pull me in too many directions. I'm using 3D physics. This issue has caused me to remain at version 1.0.7 with the project. I haven't tested out the latest version, 1.0.9, yet to see if this issue has dissolved, but when I get some more time to check I'll try it out.
  • It is ok @ScriptGeek, thanks.
  • I just discovered my project was using version 1.0.5. I was certain I updated the project to 1.0.7, but maybe the new revision was lost in the project's repository. I updated to version 1.0.9 and there appears to be some issues with the collision matrix in TrueSyncConfig. I'm not sure about enough details at this time. I'll run some tests soon to give more info.
  • Humm ok @ScriptGeek, I really appreciate your feedback.
  • edited May 30
    I updated the project to TrueSync 1.1.0 from 1.0.5 and now the physics has gone haywire. I'm also running Unity 5.6.1. The objects in the scene move erratically and without any user interaction. I've unchecked all physics layers in the collision matrix, including TrueSyncConfig, TrueSyncGlobalConfig, and Unity's Physics, as well as both 2D and 3D matrices and using a script to detect collisions with colliders and triggers with the OnSyncedCollisionEnter and OnSyncedTriggerEnter, I was still getting calls to these methods. I tried changing all kinds of settings and discovered that setting the IsKinematic checkbox on the erratic objects made the objects perform as expected, at least no longer bounding all over the place for no reason. I don't understand why this is the case. I don't know what's going on with the collision matrices, their settings seem to be completely ignored. I tried resetting them all and unchecking all the boxes to no avail. I'll see if I can post a sample project to demonstrate the issue shortly.
  • edited May 30
    OK, check out this repo link: https://github.com/ScriptGeek/TrueSyncPhysics.git

    1. Open the scene in Resources/Scenes/Game
    2. Run the program and notice the lines moving around like crazy
    3. Stop the program and go to Resources/Prefabs/prefab_Line to display properties in the inspector
    4. Check the IsKinematic checkbox
    5. Run the program again and notice the lines behave normally now

    Please have a look at the settings and see if there's something I'm doing wrong, maybe there's a magic button that has to be clicked to make the physics matrix engage. As far as I can tell the lines shouldn't have any physics forces acting upon them, so they should remain stationary regardless of kinematic or not. Also, while the lines move about like crazy they cause collisions, which as far as I understand the physics layer matrix, there shouldn't be any collisions.
  • I took a look at the Boxes demo scene in the sample project within the TrueSync package, version 1.1.0. and it appears that changes within the layer collision matrix gets ignored. Unchecking layers in the collision matrix makes no difference as collisions are still detected between those layers. Also it appears that the physics system has been exposed so I might possibly be able to identify and resolve the source of the issue myself... maybe I can post the solution here when I figure it out?
  • HI @ScriptGeek, did you disable the collision of both Default <-> Line and Line <-> LIne ?
  • @JeffersonHenrique Yes, I disabled every layer in the matrix and there's still collisions being detected. I even tried disabling all collision layers for every matrix config I could find i.e. Unity's physics (Edit -> Project Settings -> Physics & Physics2D and TrueSyncGlobalConfig asset in the Project panel). TrueSyncConfig does not exist in the project, so there's no settings to change in that one. The TrueSyncManager gameobject in the scene is set to use TrueSyncGlobalConfig.
  • Hey @ScriptGeek, we use an ignore-based collision matrix as Unity, so to disable a collision between two layers you have to check ON the box in the matrix, did you do that or leave it blank (opposite effect)?
  • edited June 7
    @JeffersonHenrique I left it blank. That explains why I had to flip the bitmask when working with layers in scripts... I should have realized this was the case. Well, I appreciate your help anyhow. At least I learned something here.
  • Great @ScriptGeek, I should include some prefix "Ignore..." to make things clear (we used the label as Unity).
Sign In or Register to comment.