rotating needle and zooming

haim96haim96 Member Posts: 87
edited November -1 in Working with GS (Mac)
Hi,

i'm trying to create rotating needle like in car speedometer.
i tried to link the needle rotation to attribute (that range 0 to 360)
the needle doesn't rotate, but if i link it to the needle X position the needle moves.
(means that the attribute is update... )

what am i doing wrong?

also, does any one know if zooming with multi touch can be done in GS.

thanks!

Comments

  • BeyondtheTechBeyondtheTech Member Posts: 809
    GameSalad's current limitation regarding this is that Actors can only rotate from its center point. It cannot pivot.

    To compensate, you need to create an Image with the pivoting point at its center. The resulting image will be 4x as big. Then, simply position the center of the Actor and its Image on the bottom half of the semicircle. Rotate it with the attribute and it will look as if it's pivoting from there.

    Here is a visual for you:
    http://www.flickr.com/photos/beyondthetech/4497242464/
  • haim96haim96 Member Posts: 87
    the image part i already know, and it doesn't need to be square. only the pivot need to be in the center.

    the thing is that changing Actor rotation doesn't cause the needle to rotate.
  • BeyondtheTechBeyondtheTech Member Posts: 809
    Did you try constraining the self.Rotation Attribute to the value instead of changing? I think it's an issue with 0.8.4 that I never saw previously. I'm going around and having to Constrain things instead of Changing them.
  • haim96haim96 Member Posts: 87
    yes, i used constrain attribute.
    it worked when i constrain it to position but not to rotation.
  • haim96haim96 Member Posts: 87
    found the answer and it's really (really) stupid!
    it worked all the time but since i changed the angle by 1 i couldn't see the rotation... :D
Sign In or Register to comment.