Wow .. alright 2 questions for 2 days
Ok so i got the scrolling by this code
where TheChild is my character so basically my camera follows the character. Good so far but....
I use the mouse click to drop an object .. lets say box .. When the game starts everything is fine .. the mouse moves and when i click the box is spawned from my mouse position .. but when my character starts walking deeper in the level the boxes spawn at the beginning. well the Y position of the boxes change according to my mouse Y position but the X just stays the same ( well not the same but around e certain point).. I think thats because the camera follows the character as he walks but the mouse stays at the same X and Y positions... I dont even know how to explain this -.-... If someone got it and can help thx but i can also make a video showing whats wrong if you dont understand .
Ok so i got the scrolling by this code
Code:
var TheChild = getChildByName("Player");
y = -TheChild.y + 280;
x = -TheChild.x + 340;
y = -TheChild.y + 280;
x = -TheChild.x + 340;
where TheChild is my character so basically my camera follows the character. Good so far but....
I use the mouse click to drop an object .. lets say box .. When the game starts everything is fine .. the mouse moves and when i click the box is spawned from my mouse position .. but when my character starts walking deeper in the level the boxes spawn at the beginning. well the Y position of the boxes change according to my mouse Y position but the X just stays the same ( well not the same but around e certain point).. I think thats because the camera follows the character as he walks but the mouse stays at the same X and Y positions... I dont even know how to explain this -.-... If someone got it and can help thx but i can also make a video showing whats wrong if you dont understand .