ApplyImpulse or ApplyForce for a cannon?

Hello, lemme do a quick introduction.

I am akr, one of the developers of game-editor, a 2D game dev environment. (game-editor.com, game-editor.net)

I am pretty far with integrating box2d into game-editor and had a lot of fun with it.

game-editor can serve well for making games, event driven. And from now on also with box2d.

See e.g. http://game-editor.com/forum/viewtopic.php?f=6&t=10863 for a box2d example. You can find the sources also there.


My question: I thought about doing a angry bird style game. What is the right function to use. ApplyImpulse or ApplyForce?

Thanks!!
They will both work but in this case the impulse is probably more straightforward because it's simpler to get the projectile to launch at a desired speed. An impulse will have the appearance of the projectile being suddenly hit by an invisible hammer. If you want it to look like more of a rubbery-stretchy kind of launch, using a force would do that but you'd have to calculate how many timesteps to apply the force for to get the desired launch velocity.

Original thread: https://box2d.org/forum/viewtopic.php?t=7551