Page 1 of 1

help with controls

Posted: Sat Dec 21, 2013 10:55 pm
by Fatmat927
I would need help with how to do controls because I started but it's not working and also if there is anything i could do to make the code better

Re: help with controls

Posted: Sat Dec 21, 2013 11:09 pm
by micha
You are not drawing what love.physics simulates.
For example, you draw Neo's image at the coordinates Neo.x and Neo.y, but love.physics does not know about these. See the physics tutorial in the wiki for how to get the coordinates of simulated objects (it's in the draw-part at the bottom).

Re: help with controls

Posted: Sun Dec 22, 2013 6:44 pm
by Fatmat927
thank you now i can move around but my collision don't match with the ground and my platform is it because of this?
i tried changing it to kinematic bodies but didn't change anything

Code: Select all

platform.body = love.physics.newBody(matrix, platform.x, platform.y, "kinematic")
platform.shape = love.physics.newRectangleShape(platform.appearance:getWidth(), platform.appearance:getHeight())