Getting absolute position from a Sprite position

For developers using the Construct 2 Javascript SDK

Post » Sun Aug 17, 2014 9:21 am

I need to get the absolute(body) position for a Sprite.

The adjustment I did was:
Code: Select all
aPosX = aPosX + jQuery(myRuntime.canvas).offset().left;
aPosY = aPosY + jQuery(myRuntime.canvas).offset().top;


But it is still off a bit to the upper left. What am I missing here?
B
18
S
7
Posts: 88
Reputation: 1,424

Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests