Hi richie,
I hope you (or someone else) will look and tell me any solve.
i am printing my values. values are correct but code not working properly.
really i didnt understand
Hi richie,
I hope you (or someone else) will look and tell me any solve.
i am printing my values. values are correct but code not working properly.
really i didnt understand
First of all, you don’t need the semi-colons after the assignment statements - this is Lua, not C++ or Java.
Second, the code is doing exactly what it is supposed to be doing, namely moving the ball as long as you are touching the red box.
Why are you adding physics properties only to the ground? Why is the ground a small vertical rectangle at the top of the screen?
I’m really not sure what you are trying to accomplish here - have you checked out the tutorials and great sample code repository that comes with Corona?
Hi again all (richie, dave…),
I need to tell you my problem one more time.
How about the “ground”? There is space between the ball and the ground. How can i fix it?
Please see the atached screen shots.
Please understand my issue and help meeeee :) :)
What are you trying to do? Do you want the ground to move with the ball and grow in height, or just move with the ball? Do you want the ball to always be at the end of the ground?
I got it guys, thanks all…
Dave, i have wanted ground to move with the ball and grow in height and i did…
There was a missing part on my code…
Missing part is:
local function moveball (event)
ball.y = ball.y + motiony;
ground:setReferencePoint(display.TopCenterReferencePoint) (Missing part 1)
ground.y=0 (Missing part 2)
ground.height= ball.y + (ball.height/2) --ground.height + motiony
end
and my ground was growning both side… :)