in love.physics.newWeldJoint() position of the anchor points in global coordinates instead of local

Issue #1232 closed
Antonio Moder created an issue
love.physics.newWeldJoint( body1, body2, x1, y1, x2, y2 )

x1, y1, x2, y2 - position of the anchor points in global coordinates instead of local, as Wikipedia says.

Issue in:

This problem may exist in other joints, need check.

Comments (5)

  1. Antonio Moder reporter
    -- my example for bugCrutch
    local localX1, localY1 = physics.body:getLocalPoint(entity:getX(), entity:getY())
    localX1, localY1 = physics.body:getWorldPoint(localX1, localY1)                                          -- bugCrutch
        thisModule.dragHands.joint = love.physics.newWeldJoint(physics.body, physics.body2
        , localX1, localY1
        , localX1, localY1)
    
  2. Antonio Moder reporter

    It seems it is starting from version LOVE 0.8.0, based on the source code, I did not check in binaries.

    I only check in binaries LOVE 0.10.2

  3. Bart van Strien

    I've edited the wiki to update this fact, since it's always been this way. And I think all other joints are also specified in world coordinates?

  4. Log in to comment