Mouse Position Inside Problem

carlblanchetcarlblanchet Member Posts: 755
edited July 2012 in Working with GS (Mac)
So I have wall actors on my scene, and the camera is controlled to go up the scene, then the goal is to move the mouse around not to touch the walls. The collision is detected with a 'mouse inside' rule in the wall actors to cause game over. All this works great, other than when the mouse is not moving around, it will overlap the walls without detecting the 'mouse inside' rule, but as soon as the mouse is moved, the 'mouse inside' rule is detected..
Anyone know how this could be fixed?

Thanks!

Best Answer

  • AcceleratedGamesAcceleratedGames Posts: 201
    Accepted Answer
    What you should do is have a 1x1 sixed actor with it's position constrained to game.MousePosition.X and game.MousePosition.Y. Then change the rule to when that actor overlaps or collides with the wall, end game.

Answers

Sign In or Register to comment.