Disappearing actors when overlapped

gann24gann24 Member Posts: 3
edited November -1 in Working with GS (Mac)
I am playing around with 4 colored boxes as I am learning to move them around with a finger. I am successful with this as I have used:

on the actor

when touch is pressed
constrain self.position.x to device.mouse.position.x
constrain self.position.y to device.mouse.position.y

My only issue is that if the boxes overlap, the box that is underneath the box being touched, completely disappears. Any ideas?

Comments

  • gann24gann24 Member Posts: 3
    I think I realize what is happening...just not sure how to fix it. I think when I press a green box (for example) that is overlapping the red box, it is constraining the red box in the exact same position as the new green box. This makes it appear that it has disappeared. This is all just a hunch...at any rate, anyone know how to move only the specific actor that I am touching and not the one that may appear underneath?
  • QuinnZoneStudiosQuinnZoneStudios Member Posts: 452
    Hey there,
    I had the same problem on a test I did earlier in the year. Sure enough, the actors were stacking under each other as I dragged the first one around.
    I suspect this may be what you are looking for? Worth a try and hope it fixes it:

    http://gamesalad.com/forums/topic.php?id=21793#post-165456

    Mike
  • gann24gann24 Member Posts: 3
    Looks promising...but haven't been successful yet. I'll try it again fresh tomorrow. Thanks!
Sign In or Register to comment.