A possible bug and it haunts me crazy
Posted: Thu Jan 05, 2017 5:15 am
Finally, I can reproduce it.
in LoadContent() function, simply add a box
wait after 5 seconds or more (this is very important).
and then apply an impulse to the box
the box is supposed to accelerate in the direction of X, but it does not move at all.
I looked into the LinearVelocity value of the box, it does increases under impulses, but the position is stationary.
However, if I use another object to shoot at this box test0, it starts moving like waking up by the collision.
in LoadContent() function, simply add a box
Code: Select all
Box test0 = new Box(Vector3.UnitY + Vector3.UnitX * 2, 2, 2, 2, 1);
AttachWithSkin(game, test0, CubeBlue);
space.Add(test0);
and then apply an impulse to the box
Code: Select all
if (KeyboardState.IsKeyDown(Keys.Enter) )
{
Vector3 p0 = Vector3.UnitX * 100 * space.TimeStepSettings.TimeStepDuration;
test0.ApplyLinearImpulse(ref p0);
}
I looked into the LinearVelocity value of the box, it does increases under impulses, but the position is stationary.
However, if I use another object to shoot at this box test0, it starts moving like waking up by the collision.