Moving an Actor Question!!

wsuhoopswsuhoops Member Posts: 28
edited November -1 in Working with GS (Mac)
I am doing a maze like game where you can control a small square, right now you can move it but only touching it. Sometimes the square is smaller then your finger so it makes it hard to see. Is there a way to have the player follow your finger but the finger doesn't have to be directly on it, aka move 1 inch down but still follow movement

Comments

  • chosenonestudioschosenonestudios Member Posts: 1,714
    what you can do is when your constraining the x and y values to the mouse position just subtract 20, 30 etc.

    E.g. :

    when touch is pressed:

    constrain self.position.x to mouse.position.x
    constrain self.position.y to mouse.position.y-20

    Soooo... your actor will be 20pxs underneath your mouse position or your finger etc. and if you want to lower it just subtract a bigger number :)

    Good Luck! :D
Sign In or Register to comment.