Object x and y position issue.

Thanks, horacebury. Yes I have given the width and height of the ImgRect while defining it. If the x and y values taken from center, is there any way to take it from object left top position…?

Please suggest…
Thanks [import]uid: 154400 topic_id: 36912 reply_id: 145157[/import]

Yep…
[lua]
hurdle:setReferencePoint(display.TopLeftReferencePoint)
[/lua]

C [import]uid: 147322 topic_id: 36912 reply_id: 145165[/import]

Thanks Caleb P, I have used what you have suggested, but when I look in to different device, the positioning was not correct. On it shows different in different platform.

Please suggest…
Thanks [import]uid: 154400 topic_id: 36912 reply_id: 145168[/import]

Have you provided the correct dimensions of the base image into newImageRect? The base image is the image which you would use for the screen resolution you provide in the config file. [import]uid: 8271 topic_id: 36912 reply_id: 145170[/import]

Are you setting x/y before or after you set the reference point?

Your procedure should be as follows:

Build object
Set reference point
Position it on-screen

C [import]uid: 147322 topic_id: 36912 reply_id: 145171[/import]

@horacebury: No I have didnot, I have assign custom height and width for that image.
@Caleb P: Yes I have assign them in same order as u have mentioned. But totally confused about this behaviour. [import]uid: 154400 topic_id: 36912 reply_id: 145172[/import]

What’s your config.lua width and height?

What device(s) is the positioning correct on, and what device(s) is the positioning not correct on?

C [import]uid: 147322 topic_id: 36912 reply_id: 145177[/import]

Hello Caleb P, I have mentioned width : 320 and height : 480 in config file. In Iphone it works well but when I checked it on droid it gets disturbed. I have checked on simulator. [import]uid: 154400 topic_id: 36912 reply_id: 145180[/import]

x and y values position the centre of an object after it is created. Also, you should be providing both the width and height of your image rect. [import]uid: 8271 topic_id: 36912 reply_id: 145152[/import]

Thanks, horacebury. Yes I have given the width and height of the ImgRect while defining it. If the x and y values taken from center, is there any way to take it from object left top position…?

Please suggest…
Thanks [import]uid: 154400 topic_id: 36912 reply_id: 145157[/import]

Yep…
[lua]
hurdle:setReferencePoint(display.TopLeftReferencePoint)
[/lua]

C [import]uid: 147322 topic_id: 36912 reply_id: 145165[/import]

Thanks Caleb P, I have used what you have suggested, but when I look in to different device, the positioning was not correct. On it shows different in different platform.

Please suggest…
Thanks [import]uid: 154400 topic_id: 36912 reply_id: 145168[/import]

Have you provided the correct dimensions of the base image into newImageRect? The base image is the image which you would use for the screen resolution you provide in the config file. [import]uid: 8271 topic_id: 36912 reply_id: 145170[/import]

Are you setting x/y before or after you set the reference point?

Your procedure should be as follows:

Build object
Set reference point
Position it on-screen

C [import]uid: 147322 topic_id: 36912 reply_id: 145171[/import]

@horacebury: No I have didnot, I have assign custom height and width for that image.
@Caleb P: Yes I have assign them in same order as u have mentioned. But totally confused about this behaviour. [import]uid: 154400 topic_id: 36912 reply_id: 145172[/import]

What’s your config.lua width and height?

What device(s) is the positioning correct on, and what device(s) is the positioning not correct on?

C [import]uid: 147322 topic_id: 36912 reply_id: 145177[/import]

Hello Caleb P, I have mentioned width : 320 and height : 480 in config file. In Iphone it works well but when I checked it on droid it gets disturbed. I have checked on simulator. [import]uid: 154400 topic_id: 36912 reply_id: 145180[/import]