I think mechatronic3000 ported Randy Gaul's Cute Physics 2D to QB64 a long time ago: 2D Physics Engine (alephc.xyz)
The updated version of that is here: QBPool/QBPOOL/fzxNGN/physics at main · mechatronic3000/QBPool · GitHub
Box2D will require a considerable effort to port. A QB64-PE wrapper may be possible. I'll need to check.
Update: Randy's latest C++ library is here: RandyGaul/ImpulseEngine: Simple, open source, 2D impulse based physics engine for educational use. (github.com). It's called Impulse Engine and not Cute Physics like I noted above.
The updated version of that is here: QBPool/QBPOOL/fzxNGN/physics at main · mechatronic3000/QBPool · GitHub
Box2D will require a considerable effort to port. A QB64-PE wrapper may be possible. I'll need to check.
Update: Randy's latest C++ library is here: RandyGaul/ImpulseEngine: Simple, open source, 2D impulse based physics engine for educational use. (github.com). It's called Impulse Engine and not Cute Physics like I noted above.