moment of rotation???

SAMmanSAMman Member Posts: 228
edited November -1 in Working with GS (Mac)
Hey all, it's that time of saturday again for headaches. does anyone know if I can change the moment of rotation of an actor? Right now when it rotates it rotates around the middle of the actor, I want to be able to change that. is that possible in GS? Thanks.
SM

Comments

  • ChessPawnChessPawn Member Posts: 127
  • SAMmanSAMman Member Posts: 228
    sort of, only it limits the ability to move the object while it is constrained and I can't find away around that.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    SAMman said:
    sort of, only it limits the ability to move the object while it is constrained and I can't find away around that.

    The actor can be moved around while the rotation is taking place. Say you had some game level attributes called 'sceneX' and 'sceneY' that you use to plot the location of an actor. Once you determine the coordinates that you want the actor placed at (game.sceneX,game.sceneY) and you have set the rotation angle of the actor (self.Rotation), It would look something like this:

    Change Attribute: self.position.x To: game.sceneX-magnitude( self.offsetX , self.offsetY )*sin(( self.Rotation )-atan( self.offsetX / self.offsetY )))

    Change Attribute: self.position.y To: game.sceneY+magnitude( self.offsetX , self.offsetY )*cos(( self.Rotation )-atan( self.offsetX / self.offsetY )))
Sign In or Register to comment.