# box2d: linearVelocity is greater than 0, but world.Step() won't move the body

**URL:** https://forum.kirupa.com/t/box2d-linearvelocity-is-greater-than-0-but-world-step-wont-move-the-body/331218
**Category:** Uncategorized
**Created:** [June 16, 2013, 3:05am UTC](https://forum.kirupa.com/t/box2d-linearvelocity-is-greater-than-0-but-world-step-wont-move-the-body/331218 "2013-06-16T03:05:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jlarson](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@jlarson](https://forum.kirupa.com/u/jlarson)
#### Post date: [June 16, 2013, 3:05am UTC](https://forum.kirupa.com/t/box2d-linearvelocity-is-greater-than-0-but-world-step-wont-move-the-body/331218/1 "2013-06-16T03:05:33Z")

</div>

[COLOR=#000000][FONT=Arial]So I have something going on that’s confusing me, involving a body not moving. I used theSetLinearVelocity() member function on a body, like so:[/FONT][/COLOR]

> dude.body.[COLOR=#2B91AF]SetLinearVelocity[/COLOR]([COLOR=#00008B]new[/COLOR] b2Vec2([COLOR=#800000]0.1[/COLOR], [COLOR=#800000]0.1[/COLOR]));

[COLOR=#000000][FONT=Arial]I then place a console.log() right before calling the Step function:[/FONT][/COLOR]

> console.log(dude.body.[COLOR=#2B91AF]GetPosition/COLOR.x);  
> console.log(dude.body.m\_linearVelocity);  
> world.[COLOR=#2B91AF]Step[/COLOR]([COLOR=#800000]1[/COLOR]/[COLOR=#800000]60[/COLOR], [COLOR=#800000]10[/COLOR], [COLOR=#800000]10[/COLOR]);  
> console.log(dude.body.[COLOR=#2B91AF]GetPosition/COLOR.x);

[COLOR=#000000][FONT=Arial]This is in my game animation loop, so the console.log gets called over and over. It saysm\_linearVelocity is a b2Vec2 with an x value of 0.1 and a y value of 0.1.  
[/FONT][/COLOR][COLOR=#000000][FONT=Arial]So right before the Step function call, the the x and y values of m\_linearVelocity are greater than zero, but there is never any change in dude.body.GetPosition().x from the beginning of the above snippet to the end.[/FONT][/COLOR]  
[COLOR=#000000][FONT=Arial]I don’t know where to start in tracking down the problem, because this makes no sense to me. Does anyone know why this might happen?

edit: I forgot to say, it works when there is gravity, but when the world has zero gravity, that’s when I have this unusual problem, and I want the world to have zero gravity.[/FONT][/COLOR]
