How do I rotate an actor not on the center?

pinata14pinata14 Member Posts: 150
edited March 2012 in Working with GS (Mac)
hi gs,
so I have a turret, and i wanted to be able to rotate it around a point which is not it's center. This is because the turret has barrels that change the center, so it would rotate weird. I also tried making an invisible opposite barrel, but then you can hit the enemies when you are aiming behind it. Thanks for any help.
-Ryan

Comments

  • pinata14pinata14 Member Posts: 150
    ok, but how would i make an exact formula if i wanted to have the turret rotate around "actor1" which moves around. the screen is set.
  • POMPOM Member Posts: 2,599
    edited March 2012
    EDIT:
    See my comment below ..

    Photobucket Roy
  • pinata14pinata14 Member Posts: 150
    what are the scene attributes? if my screen is fixed I don't have to worry about them right? and what are the offsets if my point of rotation moves? (offset+game.point position X, offset+game. point position Y) (in other words can i make the offset off of variables?
  • POMPOM Member Posts: 2,599
    Hey there ...i see TSB has a video for this , i believe he explains it perfectly , it also has a demo file for download :
    http://gshelper.com/?p=176

    Photobucket Roy
  • pinata14pinata14 Member Posts: 150
    sorry, but idgi... TSB only explains how to make it orbit, but I want the rotation to be based on the mouse position. Also, what would I change to make the box instead of rotate to face the center, rotate to face opposite the center?
    Thanks for helping me out with this.
  • pinata14pinata14 Member Posts: 150
    Please can someone help with my specific situation?
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    edited March 2012
    Here is a demo that might help with making off-axis rotations.
    http://www.mediafire.com/download.php?nc9rawgb9y3yn5z

    Hope this helps!
    RThurman
  • pinata14pinata14 Member Posts: 150
    Thanks, now i just have to convert to a web size and I can update my game with graphicsx9999 better
Sign In or Register to comment.