Rotating an object
Posted: Wed Feb 26, 2014 10:49 pm
I'm new to lua and through some luck and determination have made a program that boxes and circles bounce around and i want to make it so that i am able to rotate a box. I tried but when i push the key it comes up with an error screen.
Code: Select all
elseif love.keyboard.isDown("w") then
objects.box.body:applyForce(0, -1000)
elseif love.keyboard.isDown("s") then
objects.box.body:applyForce(0, 1000)
elseif love.keyboard.isDown("a") then
objects.box.body:applyForce(-1000, 0)
elseif love.keyboard.isDown("d") then
objects.box.body:applyForce(1000, 0)
elseif love.keyboard.isDown("e") then
objects.box.body:Rotation(45)
end