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.