Issue #1232 closed

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

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. Log in to comment