How to Orbit Actor around another Actor without using Constrain?

EricTippettEricTippett Member Posts: 45
edited August 2012 in Working with GS (Mac)
Hey there everyone,

I am currently trying to figure out how to orbit one actor around another actor. I do not want to use the usual constrain method because it is hard on memory and I don't want my game to crash. I have a pretty hectic game so I need to make everything take as less power as possible.

So does anyone know another way?

To be clear the actor is the player and when an ability is activated, 1-5 actors will rotate around the player actor and follow the player when the player moves around on the screen.

Thanks!
Eric

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    If you are not spawning the actors and the already exist on screen you can link them (in scene) which does not require external attributes and is fast and less processor intense ( I use this method and prefer it as there is no lag) so in your rule where the circling is executed use a constrain attribute so self.position x to now here go to current scene, layers,the layer the actor resides in and then select it and what you want to link to like x or y et... Remember with this method the actor being linked must be on stage and you have to unlock it. This can not be done with prototype actors being spawned.
Sign In or Register to comment.