The data I am passing to this function is all correct and I have no idea whats going wrong. Any help would be appreciated.
Below is a copy of the exceptoin detal. (I'm using Microsoft Visual C# 2005).
Thanks.
Code: Select all
System.ArgumentOutOfRangeException was unhandled
Message="Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index"
Source="mscorlib"
ParamName="index"
StackTrace:
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List`1.get_Item(Int32 index)
at BEPUphysics.StaticTriangleGroup.buildTree()
at BEPUphysics.StaticTriangleGroup.initializeData(List`1 triangleVertices)
at CharacterContolTest.Game1.CreatePhysicsEntities() in C:\Users\Jesse\Documents\Visual Studio 2005\Projects\CharacterContolTest\CharacterContolTest\Game1.cs:line 114
at CharacterContolTest.Game1.Initialize() in C:\Users\Jesse\Documents\Visual Studio 2005\Projects\CharacterContolTest\CharacterContolTest\Game1.cs:line 213
at Microsoft.Xna.Framework.Game.Run()
at CharacterContolTest.Program.Main(String[] args) in C:\Users\Jesse\Documents\Visual Studio 2005\Projects\CharacterContolTest\CharacterContolTest\Program.cs:line 14