Cannot change TSRigidBody.isKinematic when runtime

I have a problem with TSRigidBody that I set value of TSRigidBody.isKinematic = true when runtime, but rigidbody is still have gravity and fall down. What can I do to fix this problem?

Comments

  • Hi @NAGA,

    It is wierd, we will check out if there is a bug in the last version (1.0.7). Thanks for the report.
  • I checked some scripts of TrueSync plugin, and there are some missing points when change isKinematic from "false" to "true" or from "true" to "false". I found an error in TSRigidBody.isKinematic then I edited and correct it. Now it can work well for me.

    Thanks for your reply and I hope bugs in TrueSync will fix soon. I am waiting for your next version :)

    I have one more question. Usually OnSyncedInput method, it cannot work if that object is in the scene ( it doesn't instantiate from TrueSyncManager ) and I need that method work and controlled by a player that joined room. Are there any ways to do that?
  • Hi @NAGA,

    When the object is already in the scene it belongs to both players by default, which means we don't call OnSyncInput on it. If you want a object like that to belong to a player you need to change the "ownerIndex" property of your TrueSyncBehaviour component, if you set "0" then it will belong to the first player, if you set "1" it will belong to the second player and so on.
  • @JeffersonHenrique

    oh, I see.
    Thank you :)