FICHEKK
FICHEKK

Reputation: 829

How to set where 0,0 coordinates are?

By default, 0,0 coordinates are in the top, left corner. However, for my scene, it would be very helpful if it was in my bottom, left corner.

Is that even possible? If so, how can I set that?

Upvotes: 1

Views: 186

Answers (1)

Amir
Amir

Reputation: 1683

This is a mathematical approach which I think is a lot easier. Simply define a function which converts your local Y coordinate to what Corona uses:

function localY ( y )
    return 600-y --Assuming your screen size is 600 pixels
end

Then simply use x, localY(y) instead of x,y

You can do the same for x if decided to change it.

Upvotes: 1

Related Questions