Some times while game building via Box2D Physics Engine, you may need to find out whether your bodies (from b2Body) are moving or not. Use the following sample of code to find out whether the given b2Body is moving or not.

b2Body *urBody;

        //urBbody is moving! It's not in rest!

        //urBody is at rest!



One Comment

  1. praga March 4, 2012 at 3:15 pm



Leave a Reply

Your email address will not be published. Required fields are marked *




Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.