Orbit problem- How to start orbiting anywhere?
Hello everyone
I ran into a little problem which i can't seem to fix. How would i make it so an actor (earth) can rotate around the larger actor (sun) at any point?
I have been using the Orbit demo and it has the equation:
Constrain Attribute self.position.x to 100*cos(self.time*-200%360)+game.sunX
Constrain Attribute self.position.y to 100*sin(self.time*-200%360)+game.sunY
Constrain Attribute self.rotation to vectorToAngle( game.sunX - self.Position.X , game.sunY - self.Position.Y )
This makes it start on the right hand side of the sun no matter where it is replaced. I would like it to start orbiting from where it gets placed.
If anyone can help that would be great!
Thanks
JonApp
I ran into a little problem which i can't seem to fix. How would i make it so an actor (earth) can rotate around the larger actor (sun) at any point?
I have been using the Orbit demo and it has the equation:
Constrain Attribute self.position.x to 100*cos(self.time*-200%360)+game.sunX
Constrain Attribute self.position.y to 100*sin(self.time*-200%360)+game.sunY
Constrain Attribute self.rotation to vectorToAngle( game.sunX - self.Position.X , game.sunY - self.Position.Y )
This makes it start on the right hand side of the sun no matter where it is replaced. I would like it to start orbiting from where it gets placed.
If anyone can help that would be great!
Thanks
JonApp
Answers
Can any one help? Just Pm me so i can give you a detailed description and an image of what i need help with!
Thanks
JonApp
not sure if it's what you want
All the best
JonApp
Cheers!