Weird physics simulation speed

Hello community.

i’m kinda newbie here, just arrived and got a little silly question, but still.

I found that physics simulation works little weird in my case. It looks slower than it should.
I have only a 10 sprites with regular physics bodies and fps is stable 60.

Here they are:
image

That’s how I init it:

scene->getPhysicsWorld()->setGravity(Vec2(0.0f, -9.8f));
scene->getPhysicsWorld()->setDebugDrawMask(PhysicsWorld::DEBUGDRAW_ALL);

And if I add
scene->getPhysicsWorld()->setSpeed(2.0);

It works better, but still, I want to achieve more accurate result and this solution doesn’t seem to be proper one.

Thanks!

Are you testing on a hardware device or in a simulator? What platform? What cocos2d-x version?

Hardware, just compile it for Windows via Visual Studio.
Latest, 3.17/

Thanks. I have a few physics based games on ios that I don’t see things moving slow. I am doing some Windows testing for other things so I can add this to my list as well.

Edit: Just to be sure, you are ok with 60 fps and know you can change that in AppDelegate?

Oh, I appreciate it!

But probably you know how can I debut it? Like, obtain physics step?

Sure, 60 is adorable, isn’t it?

Anybody? Please, I can’t get rid of it.
Gravity isn’t correct at all.

There is a little video demo

That’s how I create blocks

BlockNode::BlockNode() {

	this->sprite = Sprite::create(this->SPRITE_FILE_NAME); 
	auto body = PhysicsBody::createBox(this->sprite->getContentSize(), PHYSICSBODY_MATERIAL_DEFAULT); 
	body->setMass(100); 

	this->addComponent(body); 
	this->setPhysicsBody(body);
	this->addChild(this->sprite); 
}

I’m trying Windows tests just working on setting up a clean environment.

You just need to set higher gravity value, thats very common for games.

No, it’s not.

How can I reach realistic objects falling then?

It must be a bug.

No its not. Increase your objects friction and gravity to match your needs. Most of the physics libraries uses some kind of constants to negate float calculations, Take for example Box2D uses multiply by 32 to achieve optimal calculation base.

Just try -980 instead of -9,8