Projects > cpp > Issues > Bug #5482

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

Node::setPhysicsBody() doesn't work after node added to other node.

Bug #5482 [Closed]
boyu0 2014-06-04 03:15 . Updated over 5 years ago

The code below doesn't work:

    auto anchorNode = Sprite::create("Images/YellowSquare.png");
    anchorNode->setPosition(100, 100);
    this->addChild(anchorNode);
    anchorNode->setPhysicsBody(PhysicsBody::createBox(anchorNode->getContentSize()));
boyu0 2014-06-04 09:28
  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset commit:dd0eecb905d9a4776abbb8e18b4cb9e755f26e5b.

Atom PDF

Status:Closed
Start date:2014-06-04
Priority:Normal
Due date:
Assignee:boyu0
% Done:

100%

Category:all
Target version:v3.2