Center of Rotation

sdparduesdpardue Member Posts: 110
edited November -1 in Working with GS (Mac)
Trying to figure out how to set the the center of rotation for an actor, or if it's even possible.

Now the point about which the actor revolves is its center (AKA its position). Is it possible to reset the rotation point to the actor's top-left corner, for example, or ideally an expression yielding any other X,Y coordinates on the screen?

Just curious.

Steve

Comments

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Rotation via Rotate behavior or Rotate To... is from the position of the actor.

    If you want to mimic rotation around some other point, you would need to throw in some math on the angle to rotate while moving the center point.
  • maniraptormaniraptor Member Posts: 81
    I had trouble figuring out a solution to a similar problem. (Trig is a perennial bugbear for me when I write game code; apparently it still haunts me even when I'm just plugging numbers into expressions. >_<)

    You might find this helpful: http://gamesalad.com/wiki/how_to_gsc_circular_movement
  • FranzKellerFranzKeller Member Posts: 517
    Would be very handy to be able to specify that ( for motion of arms, etc, as in after effects layers ) without resorting to trig code

    Old fashioned work around? Make your bitmaps with an invisible counterweight on the opposite side
    Thought that does throw off the collision detection potential
  • rustbucketrustbucket Member Posts: 19
    I just made the bitmap's canvas the size of the actor but only used the front 50% to create the graphic. In other words if you want a 100px actor to appear like it's rotating from it's end point make a 200px canvas but only use the right 100px of the canvas. Man, I hope that made sense...
Sign In or Register to comment.