I`m getting array out of index in BEPUutilities.DataStructures.RawList<BEPUphysics.NarrowPhaseSystems.Pairs.NarrowPhasePair>.FastRemoveAt(int index) when adding box to physics scene in bepu 1. It happens when I receive command from server that I execute.
I tried to use Space.SpaceObjectBuffer but it didn't help as I thought it might be because of bepu is currently running.
Code: Select all
 
 	/// <summary>
        /// Removes an element from the list without maintaining order.
        /// </summary>
        /// <param name="index">Index of the element to remove.</param>
        public void FastRemoveAt(int index)
        {
            if (index >= Count)
            {
                throw new ArgumentOutOfRangeException("index");
            }
            Count--;
            if (index < Count)
            {
                Elements[index] = Elements[Count];
            }
            Elements[Count] = default(T);
        }Code: Select all
    
    public void StepForward(float dt)
    {
        tickSystem.Run();
        physicsScene.Update();
    }