1. rude
  2. love

Issues

Issue #423 resolved

Allow 2D arguments to Source:setPosition, etc

Anonymous created an issue

Considering that the name of the engine is "Love 2D," I would like to suggest that the setPosition, setVelocity, and setDirection methods of Source objects would allow the programmer to pass only the first two arguments (x and y) and have z default to 0. This would let us write, for example: {{{

!Lua

my_source:setVelocity(my_body:getVelocity()) }}} Currently, code like this required to do the same thing: {{{

!Lua

local x, y = my_body:getVelocity() my_source:setVelocity(x, y, 0) }}}