Move from touch bug/glitch?

BackUpAndDownBackUpAndDown Member Posts: 685
edited November -1 in Working with GS (Mac)
I have a character that I want to move away from the players touch, kinda like a magnet. I used the "Move to" behaviour like this...

Move To
Position: X=(game.Touches.Touch 1.X) Y=(game.Touches.Touch 1.Y) Relative to: scene
Speed: (-100)

This makes the character work perfectly on the default sized scene but once I expand the scene size and add the "Control Camera" behaviour it gets all messed up.

Anyone know how to fix this?

Comments

  • BackUpAndDownBackUpAndDown Member Posts: 685
    I've been experimenting with a few other movement alternatives and it seems like this is some kind of bug or glitch... The movement works fine until the actor leaves the default scene size. This is a real pain since some of my levels are bigger then the default size... Arg. =/
  • BackUpAndDownBackUpAndDown Member Posts: 685
    Could someone post a way to have an actor move away from the players touch position that works on scenes larger then the default? Thanks. =)
  • calvin9403calvin9403 Member Posts: 3,186
    how about when touch is press, spawn actor in the place you want to go, and move to it
  • BackUpAndDownBackUpAndDown Member Posts: 685
    Thats a really good suggestion but with how my game is set up the "move from" is the only style that would work. =/
  • calvin9403calvin9403 Member Posts: 3,186
    how about when touch spawn an actor that hits the other actor?
  • StusAppsStusApps Member, PRO Posts: 1,352
    Yeah, you have to account for the camera when constraining to touch positions. Unlock the actor and try changing all your: 'game.Touches.Touch 1.X' to 'game.Touches.Touch 1.X + scene.camera.origin.x' and the same with the Y.

    Should be + .... i think, if it doesn't work try -
  • BackUpAndDownBackUpAndDown Member Posts: 685
    StusApps said:
    Yeah, you have to account for the camera when constraining to touch positions. Unlock the actor and try changing all your: 'game.Touches.Touch 1.X' to 'game.Touches.Touch 1.X + scene.camera.origin.x' and the same with the Y.

    Should be + .... i think, if it doesn't work try -

    Thank you soooooooooo much. :D
Sign In or Register to comment.