Hello everyone, I just started writing code for a game but I have a problem with the gravity, in my game there should be coins falling, instead they go up, here’s my code, any idea of what could be wrong?
local physics = require(“physics”)
physics.start()
physics.setGravity(0, 9.8)
display.setStatusBar(display.HiddenStatusBar)
local background = display.newImage(“wall.png”)
local plate = display.newImage(“plate.png”)
plate.y = display.contentHeight
plate.x = display.contentWidth/2
physics.addBody(plate, “static”)
local coin = display.newImage(“coin.png”)
coin.y = display.contentHeight - 10
physics.addBody(coin) [import]uid: 128091 topic_id: 22195 reply_id: 322195[/import]
[import]uid: 52491 topic_id: 22195 reply_id: 88289[/import]