views:

38

answers:

1

When I use the following, sometimes I get a negative value in mmVelik.x and mVelik.y. Can anyone explain why??

b2Vec2 mVelik = ballBody->GetLinearVelocity();
+2  A: 

If the value couldn't be negative, then objects would only be able to move in one direction. If the x value is positive, the velocity is toward the right, if it's negative, then toward the left. And ditto for the y value (down/up).

Felixyz