Mouse Can be an actor?

SimiglaRolandSimiglaRoland Member Posts: 20
edited July 2015 in Working with GS (PC)

Hello Guys, i thought about it and now a i want to make an app like:
A maze where your charachter is moving where your fingers are for example:
At the top of the Maze 1 touch the screen and i want to move all around to the bottom of the maze without colliding with obstacles. But i'm not sure how to do this, please can you help me? i tried this:

If Mouse Position is not over actor
If mouse Button is down
do
move to MOUSE POSITION X to MOUSE POSITION Y
it looks like working but it's glitchy laggy etc, are there a better solution? thanks a lot

Comments

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276

    Instead of move to, try constraining the actors position.x and position.y to mouse x and y.

    Mental Donkey Games
    Website - Facebook - Twitter

  • SimiglaRolandSimiglaRoland Member Posts: 20

    wow that works like a Joy thanks a lot :) one more question, this will function like touch on a mobile device?

  • SocksSocks London, UK.Member Posts: 12,822

    @SimiglaRoland said:
    wow that works like a Joy thanks a lot :) one more question, this will function like touch on a mobile device?

    Yes.

Sign In or Register to comment.