How To Orbit Off Axis ?

JelJel Member Posts: 319
edited November -1 in Working with GS (Mac)
I currently have this as my orbit rule which works well.

<img src="http://needanerd.110mb.com/GSForumFiles/Orbit.png">

But I'm trying to get the actor to orbit off axis kind of link a satellite would. Does anyone know the best way to do this ?

Thanks Jel

Also what's wrong with my image link ¿¿¿

Comments

  • JelJel Member Posts: 319
    Image posting doesn't seem to be working so the expression I'm using is.

    self.PositionX - 60*cos( self.Time *100%360)+160

    self.PositionY - 120*sin( self.Time *100%360)+240
  • UtopianGamesUtopianGames Member Posts: 5,692
    Have you tried changing the +240 in your sin code?

    Darren.
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    Just an idea (not sure if this is correct)

    Instead of 240 why not try having a game.attrbute (integer)

    Then have a rule setup that interpolates that attribute from 120 to 240 and back again. (or something like that)

    Bit messier than one line of code though.

    self.PositionY - 120*sin( self.Time *100%360)+game.satellite_orbit.
  • JelJel Member Posts: 319
    Thanks guys,

    It needs a little cleaning up on my end but adding a attribute and interpolating it seems to work pretty well.

    Is there a problem with posting images into posts at the moment ?
  • FanStudioUKFanStudioUK Member Posts: 459
    you need to add this at the end of the <img parameter: />
  • JelJel Member Posts: 319
  • ORBZORBZ Member Posts: 1,304
    Click: a=v^2/r
  • JelJel Member Posts: 319
    Thanks ORBZ,

    I'll try and absorb the above links tomorrow when my brain hurts less.
Sign In or Register to comment.