Skip to content

Commit

Permalink
Use x and y of joint object as anchor_x and anchor_y if not set in Tiled
Browse files Browse the repository at this point in the history
  • Loading branch information
ldurniat committed Dec 18, 2020
1 parent d2cd9df commit 32ab192
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ldurniat/plugins/pivot_joint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ function M.new( display_object, map )

local bodyA_name = display_object.bodyA_name
local bodyB_name = display_object.bodyB_name
local anchor_x = display_object.anchor_x
local anchor_y = display_object.anchor_y
local anchor_x = display_object.anchor_x or display_object.x
local anchor_y = display_object.anchor_y or display_object.y

if bodyA_name and bodyB_name and anchor_x and anchor_y then

Expand Down

0 comments on commit 32ab192

Please sign in to comment.