Isn't it just the same as the distance between any two objects?
Actually, even easier, because you really only need the distance on the x axis.
m_bulletBody->GetPosition().x - m_armBody->GetPosition().x
Question
i am using cocoa2d and Box2D frame for implementing functionality IOS App similar to angry bird game, using the code from following link Source Code
But i need to calculate the distance the bird (any object from the spring) that has landed from the actual spring stands
Can you please let me know is there any solution to find out the distance??
Solution
Isn't it just the same as the distance between any two objects?
Actually, even easier, because you really only need the distance on the x axis.
m_bulletBody->GetPosition().x - m_armBody->GetPosition().x