help with controls

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Fatmat927
Prole
Posts: 42
Joined: Wed Sep 18, 2013 1:15 am

help with controls

Post 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
Attachments
matrix.love
(4.32 KiB) Downloaded 115 times
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: help with controls

Post 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).
Fatmat927
Prole
Posts: 42
Joined: Wed Sep 18, 2013 1:15 am

Re: help with controls

Post 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())
Attachments
matrix.love
(4.37 KiB) Downloaded 110 times
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests