Exemplo n.º 1
0
	b2Vec2 getForwardVelocity() {
		b2Vec2 currentForwardNormal = w_body->GetWorldVector(b2Vec2(0, 1));
		return b2Dot(currentForwardNormal, w_body->GetLinearVelocity()) * currentForwardNormal;
	}
Exemplo n.º 2
0
	b2Vec2 getLateralVelocity() {
		b2Vec2 currentRightNormal = w_body->GetWorldVector(b2Vec2(1, 0));
		return b2Dot(currentRightNormal, w_body->GetLinearVelocity()) * currentRightNormal;
	}