Search Unity

[Error] Getting rigidbody.force assign attempt ... is not valid.

Discussion in 'Physics' started by Arowx, Nov 1, 2015.

  1. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Which is odd as this is from the Tanks demo and triggered by the ShellExplosion code(line below):

    Code (CSharp):
    1. targetRigidbody.AddExplosionForce (m_ExplosionForce, transform.position, m_ExplosionRadius);
    The reason this is odd is the error is being triggered from an API function that generates/calculates the force so it looks like it's a Unity API error to me?
     
  2. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    So this is just about tanks demo not working / some special case you noticed or AddExplosionForce not working in general?

    At least here for me AddExplosionForce is working OK, not used it that much, but it seems to be working.

    Maybe it's just something to do with values you assigned?
     
  3. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    It was while I was working on TanksAI I added the NavMeshAgent and a couple of new components and I started getting weird internal errors as well as this one.

    Once I noticed the errors referred to an rkBox(?) and something about an AABB alignment I tried changing the Tanks collider to a sphere and the errors disappeared.