A question about TSCollision.contacts

Options
Hello,I wrote my own simple 2d bounce script just like this.
But the TScollision2d.contacts[0].point is always(0,0),and the TScollision2d.contacts[0].normal is (0,0),too.That confused me.Is it a bug or it's just my problem.

Comments

  • kidd5368
    Options
    Here's my code
    public void OnSyncedTriggerEnter(TSCollision2D other)
    {
    TSVector2 predir = rigid2d.velocity.normalized;
    TSVector2 normal= other.contacts[0].normal;
    TSVector2 curdir= TSVector2.Reflect(predir, normal);
    rigid2d.velocity = curdir.normalized * (rigid2d.velocity.x / rigid2d.velocity.normalized.x);
    }
  • JeffersonHenrique
    Options
    Hello @kidd5368, I don't know how is your scene setup but seems some problem in TrueSync. We are now focused on core things, but you can take a look of how a TSCollisision2D is created, we use Farseer physics for 2D.