After the scene quick switched to right, when i touch on the actor, it disappear.

tammywkwongtammywkwong Member Posts: 10
edited April 2016 in Working with GS (PC)

I make a scene which would quick switch to right when the level was completed. For the right hand side, it is the advance of the preivous game.
The rules in the left hand side of the scene are if touch is press, constrain self.positive.x and y to game.touch.1.x and y, It work fine. But when I make the same rule in the right hand side of scene. Once I touch the actor, it disappear.
What wrong did I did?
https://dropbox.com/s/rov8xy0h1zlmcht/Question.zip?dl=0

Comments

  • HopscotchHopscotch Member, PRO Posts: 2,782

    Hi @tammywkwong

    your actor has not disappeared, it just moved out of sight to left. Touch returns coordinates relative to the visible part of the scene. It does not account for the camera having moved.

    You need to add the camera offset to the touch position if you have a moving camera view.

    Here is a video explaining the process:

  • tammywkwongtammywkwong Member Posts: 10

    Thanks! Solved

Sign In or Register to comment.