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.
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
You could be able to do it with [wiki]Body:setFixedRotation[/wiki]
Also, double posting isn't seen well here, please edit your last post if no one has answered yet
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics