display.setStatusBar( display.HiddenStatusBar )
require('physics')
physics.start()
physics.setGravity(0,0)
local pilka = display.newCircle(240,450,15)
physics.addBody(pilka,'dynamic',{density=1,bounce=1})
pilka:setLinearVelocity(math.random(-50,50),math.random(-400,400))
local test = display.newText(pilka.y,200,20,native.systemFont,48)
As the circle moves, the position of its centre changes. How can I get it? The value of pilka.y
doesn’t change. [import]uid: 227611 topic_id: 36057 reply_id: 336057[/import]