นี่คือวัตถุของฉันซึ่งฉันต้องการให้ความเร็วสูงขึ้น
local myImage = display.newImage( "rose.png" )
myImage.x = 320
myImage.y = 500
myImage.rotation = 0
physics.addBody( myImage, { density=0.1, friction=2.0, bounce=0.0,velocity=-40 } )
ฟังก์ชั่นให้ความเร็วสูงขึ้น
local function test()
myImage:setLinearVelocity(0, -20)
end
test()
วัตถุไม่เคลื่อนที่ขึ้น และนี่คือฟิสิกส์ของฉัน:
adding Physics
local physics =require("physics")
physics.setGravity(0,0.9)
physics.start()