How does linear velocity work ?
Posted: Sun May 29, 2016 11:19 pm
Hello, i'm trying to use this https://love2d.org/wiki/Body:setLinearVelocity and this https://love2d.org/wiki/Body:getLinearVelocity but i don't understand how they work. The "getLinearVelocity" function always returns me zeros.
For example, this love.update function :
My terminal is full of ... zeros This seems not logic...
But I'm new here, I don't seriously know how to do something with LÖVE so my problem may be very stupid...
For example, this love.update function :
Code: Select all
function love.update(dt)
body:setLinearVelocity(800, 800)
world:update(dt)
print(body:getLinearVelocity())
end
But I'm new here, I don't seriously know how to do something with LÖVE so my problem may be very stupid...