--- lel/cocos2d-x-3.14/cocos/physics/CCPhysicsBody.cpp 2016-12-29 13:42:38.000000000 -0400 +++ /opt/cocos2d-x-git/cocos/physics/CCPhysicsBody.cpp 2017-01-08 12:02:19.747686186 -0400 @@ -575,12 +575,12 @@ void PhysicsBody::setVelocity(const Vec2& velocity) { - if (!_dynamic) + if (cpBodyGetType(_cpBody) == CP_BODY_TYPE_STATIC) { - CCLOG("physics warning: your can't set velocity for a static body."); + CCLOG("physics warning: you can't set velocity for a static body."); return; } - + cpBodySetVelocity(_cpBody, PhysicsHelper::point2cpv(velocity)); } @@ -601,12 +601,12 @@ void PhysicsBody::setAngularVelocity(float velocity) { - if (!_dynamic) + if (cpBodyGetType(_cpBody) == CP_BODY_TYPE_STATIC) { - CCLOG("physics warning: your can't set angular velocity for a static body."); + CCLOG("physics warning: you can't set angular velocity for a static body."); return; } - + cpBodySetAngularVelocity(_cpBody, velocity); }