Search found 13 matches

by Yani354
Thu May 25, 2023 9:24 am
Forum: Support and Development
Topic: how can i access x and y love.touch.getPosition variables?
Replies: 6
Views: 1635

Re: how can i access x and y love.touch.getPosition variables?

You set bx to ConMouseX, which you initialize in load as latest active touch, which almost always would be none, so the loop is not called at all and ConMouseX is not set to any number, so it is nil. i know that ConMouseX is nil i am asking if there is a way that i can initialize ConMouseX in load ...
by Yani354
Wed May 24, 2023 11:02 pm
Forum: Support and Development
Topic: how can i access x and y love.touch.getPosition variables?
Replies: 6
Views: 1635

Re: how can i access x and y love.touch.getPosition variables?

You are checking only for touches, that are present during the game load (function love.load), I think, you wanted to use it in love.update, which is below and empty. Sorry i wasn't very clear with my code this is a better example: Joystick = {} function Joystick:load() touches = love.touch.getTouc...
by Yani354
Wed May 24, 2023 5:37 pm
Forum: Support and Development
Topic: how can i access x and y love.touch.getPosition variables?
Replies: 6
Views: 1635

how can i access x and y love.touch.getPosition variables?

i have a problem that i don't know how to fix and don't know if there is a way to fix it. is there a way that i can access the x and y that are in the for loop. This is just an easy example: function love.load() touches = love.touch.getTouches() for i, id in ipairs(touches) do x, y = love.touch.getP...