Drag in 2D simulation

Options
Hi,

We're trying to port TrueSync in our game, CapRiders: Euro Soccer:

http://store.steampowered.com/app/492200

in order to develop a stable and reliable multiplayer online.

In this game we use a simple 2D physics, and we modulate character's mass and drag at runtime in order to create a good feeling.

We've tried to reproduce this setup using TrueSync physics, but with the same values the result is very different, in particular with linear drag. Is it correct?

In Box2D, the linear drag of a rigidbody is applied during each Solve step:

v *= 1 / (1 + deltaTime * linearDrag)

How drag is applied in your custom engine?

Thanks a lot,

Devis

Comments

  • JeffersonHenrique
    Options
    Hi @Devis,

    The 2D physics engine use the following calculation:

    NewVel = (1 - deltaTime * linearDrag) * Vel

    If you find any problems related to it you can reply here, thanks for the feedback.
  • Devis
    Options
    Ok, so it is different from the drag computed by Unity's physics 2d engine.

    I'll do some tests.
  • JeffersonHenrique
    Options
    Thanks @Devis, our goal is to keep the same behaviour as Unity when possible, in future releases we should have the same computation as you expected ( properly present in changelog ).
  • Devis
    Options
    Thanks @JeffersonHenrique! When we can expect a new version of TrueSync? Do you have a public roadmap?
  • erickpassos
    Options
    Hi Devis,

    We don't have a public roadmap yet, but we're trying to send updates every other week (sometimes even faster). We'll have a new one before the holidays...:)
  • drdavient
    Options
    I'm also looking for this same behaviour so I don't have to rebalance my game (Blockships) to integrate Truesync. hope this gets sorted soon
  • JeffersonHenrique
    Options
    Nice @drdavient, we have always this in mind, to keep the same behaviour as Unity as far we can.
  • drdavient
    Options
    How can we actually set the drag value of a TSRigidBody2D? Is this a future feature or have I missed something?
  • erickpassos
    Options
    Hi Drdavient,

    There is the internal drag property, but it's not exposed yet. Jefferson is logging everything that's asked for here and will add most of these in the next 1.0.7 release (second week of January).