Hello,
Ive made a button that reacts to physics and can be thrown around the screen using the gameUI.lua file you can download.
The issue is when I add physics to it the “hitbox” (sorry I wasnt sure what else to call it) would become offset, I was wondering if there was any way of making the “hitbox” act normal again?
Thanks.
crabBtn = widget.newButton{ width = 36, height = 36, defaultFile = "crabIcon.png", overFile = "crabIcon.png", label = "Ship Game", onEvent = crabIconHandler } physics.addBody(crabBtn) crabBtn:addEventListener("touch", gameUI.dragBody)
I have also included a photo of the broken button “Ship Game” and what I want it to do. The other icon shown in the photo is just an image with the same physics and gameUI added. I dont want the button to sink in the ground.