isResting returns false always

isResting returns false always
0

#1

I want to check whether body stopped or not using this;

auto checkisResting = sprite->getPhysicsBody()->isResting();

but it returns false for unmoving objects.

How can I check body is not moving? Thanks


#2

I solved this problem by using getVelocity. If returned Vec2 x,y values of abs() values both near 0.00 its stopped


closed #3

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.


#4

Shouldn’t it return false for moving objects? because they are NOT resting.

What am I mis-understanding here?


opened #5

#6

moving or not it returns false for all


#7

I will test this so we can open a GitHub issue if needed.


#8

thank you.