objective c - GetBodyCount() always returning 0 in Box2d? -
I am using the cocos2d-iphone + Box2d engine, to make my body Box2d is a simple call:
B2 Body * Credabody = World-> CreateBody (and Credboedy Def); Then I am printing new incremental body count variables:
CCLOG (@ "There are% 0.0f bodies in the world.", The world - & gt; GetBodyCount ()); However, GetBodyCount () always 0 returns? I know that the body count count has increased, when I debug and am moving into CreateBody (..) m_BodyCount , and my inspector returns 1 I can not understand how world-> GetBodyCount () is just a return m_BodyCount is going to be unsuccessful and can return 0 ?
Hope someone can help! Cheers.
"Text">
what GetBodyCount () is returning an int? If so, then you should use% d in the format string.
Comments
Post a Comment