love icon indicating copy to clipboard operation
love copied to clipboard

Update Box2D to 2.4.2

Open tpimh opened this issue 6 months ago • 4 comments

Fixes issue #2198

tpimh avatar Sep 03 '25 10:09 tpimh

Joint:getType() was returning distance for RopeJoint since Box2D 2.4.1 (because this is what it is now: https://github.com/love2d/love/commit/fc2cf602f67cbf97286f6b307baff104228e3629).

I removed rope value completely, because it became dead code. Maybe it's possible to add some detection logic and return the correct type here:

https://github.com/love2d/love/blob/5903ad8901a1cb3a2bf1d65ab58f3347a5821323/src/modules/physics/box2d/Joint.cpp#L67-L68

tpimh avatar Sep 03 '25 11:09 tpimh

Or maybe it's better to just override getType() like this https://github.com/tpimh/love/commit/9fa0007a71af2883380b9978ab66d73406753db6?

tpimh avatar Sep 03 '25 12:09 tpimh

the ci for windows can't find the nsis compiler and fails but other than that error this looks fine to me, can we merge this now

hexatorum avatar Sep 21 '25 11:09 hexatorum

@hexatorum in current state, this PR removes "rope" JointType completely (it was broken since the last Box2D update). My proposed solution to restore this functionality is here: https://github.com/tpimh/love/commit/9fa0007a71af2883380b9978ab66d73406753db6. If it looks good to you, I will replace the last commit in this PR with the one from that branch.

tpimh avatar Sep 22 '25 13:09 tpimh