Should I use the extensions classes in particular PhysicsSprite

I want to use Box2d and I stumbled upon PhysicsSprite extension class. But , I couldn’t find much information about it and I couldn’t include it in my visual studio win32 project no matter what I tried #include “cocos-ext.h” just gave me many errors. Should I even bother using it ?

Personally I use Box2d.
Partly because I chose it over Chipmunk before PhysicsSprite was available.
Partly because the help on Box2d is fantastic out there (see iforce2d)
But mainly because I completely separate my physics and my game - so I really don’t want a physics sprite - I have a physics world going about its business, and my visual representation of that could e sprites, openGL drawing - whatever - and I find that easy to do without a PhysicsSprite.

YMMV of course!

If I was just writing a simple game and just, say, wanted collision detection, I’d probably use the built in physics stuff.

1 Like

Hey @Maxxx thanks for your reply. I also separate my physics from my visuals and I use update function to synchronize them and it worked for me. I just saw that extension class and thought I’ll give it a try but I could not include the extension in my project. So just for “general knowledge” how one should use extensions in visual studio project ? When I include I see no PhysicsSprite. tried adding the preprocessor commands and what not. still couldn’t include an extension class in my project. (it bugged me that something that simple doesn’t work for me :slight_smile: )

What version of cocos2d-x are you using?

I’m using the latest version 3.9