Negative SpeedFactor issue

Topics: User Forum
Jun 23, 2007 at 8:02 AM
I was using the version 1.0.0.5 and have recently installed the 1.0.2.0, and now I can't use a negative speedFactor because I get an out of range exception on the Update call:


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 System.Collections.ObjectModel.ReadOnlyCollection`1.get_Item(Int32 index)
at Xclna.Xna.Animation.BoneKeyframeCollection.GetIndexByTime(Int64 ticks)
at Xclna.Xna.Animation.AnimationController.GetCurrentBoneTransform(BonePose pose, Matrix& transform)
at Xclna.Xna.Animation.BonePose.GetCurrentTransform()
at Xclna.Xna.Animation.BonePoseCollection.CopyAbsoluteTransformsTo(Matrix[] transforms)
at Xclna.Xna.Animation.ModelAnimator.Update(GameTime gameTime)
at Microsoft.Xna.Framework.Game.Update(GameTime gameTime)
at Game1.Update(GameTime gameTime) in D:\Projetos\teste1\teste1\Game1.cs:line 633
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
at Microsoft.Xna.Framework.GameHost.OnIdle()
at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run()
at Microsoft.Xna.Framework.Game.Run()

Any way out of this problem? or should I try to change the source? because it seems that when you calculate the new frame of the animation negative values are being allowed.

Thanks!