Help with actor following mouse after camera zoom

UtopianGamesUtopianGames Member Posts: 5,692
edited November -1 in Working with GS (Mac)
Hi Guys,

Been struggling a bit for a few hours with this one so made a video to explain a little clearer.

When i zoom the camera into an actors XY position then try and drag that actor around by constraining the actors XY to mouse XY the position of the mouse goes off a little as seen in this video.

http://www.utopiangames.co.uk/downloads/mousefollow.mov

Any help would be fantastic!

Darren.

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    Ok, so you will need to take into account the camera origin X and Y and add them to the Mouse Position to get it to work. I'll see if I can knock together a demo...
  • UtopianGamesUtopianGames Member Posts: 5,692
    Thanks FMG.

    Im also trying to get rid of the black borders (stopping the camera from scrolling past the background image).

    All fun and games :P

    Darren.
  • UtopianGamesUtopianGames Member Posts: 5,692
    Solved it...you have to constrain the camera to mouse position /2 if you set the camera to zoom in by 2xs.

    Phew big thank you to you know who:)

    Darren.
  • UtopianGamesUtopianGames Member Posts: 5,692
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Awesome man! Glad you got it working!
  • StusAppsStusApps Member, PRO Posts: 1,352
    thank you, thank you, thank you

    A whole day messing with this until I found this thread!
  • StusAppsStusApps Member, PRO Posts: 1,352
    Question, how did you get the actor to stop moving at the edge of the scene? mine keeps on moving into the black void beyond it.

    Cheers
Sign In or Register to comment.