ANSWERED - Rotater actors on touch without getting the other actor to spin(Watch like)

mighty_poohmighty_pooh Member Posts: 20
edited August 2012 in Working with GS (Mac)
Hi there im making a watch like item for my game.

Im using rule on touch in side
rotate to angle - and with the bound to follow mouse on y and x

When i spin the short actor and hit the large actor it graps the large actor aswell.
Does anyone have an idea of how to not grab the large actor when i slide through it?

Comments

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Using two tests on each clock hand will make things easier:

    When (All)
    -- Actor receives event: touch is pressed
    -- Actor receives event: touch is inside
    ---- Do the drag thing
    Otherwise
    ---- Do something else
  • mighty_poohmighty_pooh Member Posts: 20
    Arh thank you very much RThurman.
  • mighty_poohmighty_pooh Member Posts: 20
    vectorToAngle( game.Mouse.Position.X - self.Position.X , game.Mouse.Position.Y - self.Position.Y )
    This is how i do the behavior - Rotate to angle. I dont have pro yet so i cant test on a real device. But some times it seems to work very well on the GS emulator sometimes it doesnt.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    edited August 2012
    You will get pretty good results with:

    Rotate To Position
    Position>: game.Touches.Touch1.X Position^: game.Touches.Touch1.Y
    Speed: 500 Relative To: Scene
  • mighty_poohmighty_pooh Member Posts: 20
    Thank you. Ill try that.
    Another thing. When i watched a video guide on how to spawn and rotate items it told me to double the image size. A blank side the same size as the picture. The problem with the watch is that this allows me to touch the backside of the pin where ther visually is no pin. Is there a way to put an anchor point in the buttom of the actor instead of a double size image?
  • mighty_poohmighty_pooh Member Posts: 20
    Ive been reading around seems like anchor is not an option. The new position you gave me seems to work alot better, hence i dont need what i just asked for. Ill change post to answered.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    It is possible to create a different "anchor point". But it requires a bit of math and is kind of a work-around at the moment. I am hoping that the good people at GameSalad will figure out how to let the developer specify where the rotation point should be.
Sign In or Register to comment.