Brent
Question regarding the co-ordinate system as I am getting a bit confused…
my sprite sheet data is as follows (snippet)
frames = {
{
-- dog\_wakesup\_00000
x=406,
y=440,
width=200,
height=84,
sourceX = 82,
sourceY = 632,
sourceWidth = 1024,
sourceHeight = 768
},
{
-- dog\_wakesup\_00001
x=406,
y=440,
width=200,
height=84,
sourceX = 82,
sourceY = 632,
sourceWidth = 1024,
sourceHeight = 768
},
my main.lua file is as follows
display.setStatusBar( display.HiddenStatusBar )
print( 1 / display.contentScaleX, 1 / display.contentScaleY )
local definitions = require ('data')
local imageSheet = graphics.newImageSheet("testing.png", definitions.options )
local character = display.newSprite( imageSheet, definitions.sequenceData )
character:setReferencePoint( display.CenterReferencePoint )
character:setSequence( "left")
character:play()
character.x = display.contentWidth/2
character.y = display.contentHeight/2
with me setting the x and the y values to the center of the screen I would expect the sprite to be in the middle of the screen…
however the sprite is at the bottom left… what am I missing here?
Thanks again [import]uid: 67619 topic_id: 34423 reply_id: 136978[/import]