I’m having trouble with the physical cocos2d-x. I get unexpected jumps in my “Player” when he is on the floor.
The world physics:
scene->getPhysicsWorld()->setDebugDrawMask(PhysicsWorld::DEBUGDRAW_ALL);
scene->getPhysicsWorld()->setGravity(Vec2(0,-20));
scene->getPhysicsWorld()->setSpeed(5);
scene->getPhysicsWorld()->setUpdateRate(0.01f);
Physics of “player”:
physicsPlayer = PhysicsBody::createBox(Size(25,25), PhysicsMaterial(0.01f,0,0));
The floor of my game:
auto physicsBottomFloor = PhysicsBody::createBox(Size(350,175), PhysicsMaterial(0,0,0));
physicsBottomFloor->setDynamic(false);
Someone that helpe me please.