Hi Community for wonderful people,
How does one go about - getting a sprite to orbit around another sprite?
I've asked this historically, but my question seems to have vanished.
I also found https://www.construct.net/en/forum/construct-classic/help-support-using-construct-38/object-orbit-around-33428 but not sure I fully understand it :(
Thanks,
Roberto
just have a look at my capx
https://www.construct.net/en/tutorials/elliptical-orbit-904
Develop games in your browser. Powerful, performant & highly capable.
Most impressive sizcoz.
How do I alter the satellite to rotate 360... rather than elliptical?
if I alter the orbit_height/width I don't get the 360 :(
Ok
For this example, if you wanted to circle around the circumference of a sprite which is 100 x 100, and is in the centre of a layout which is 480 x 640 you would do the following.
50*cos(sprite_angle)+240
50*sin(sprite_angle)+320
Hope this helps.
Thanks sizcoz ;)
Hi sizcoz,
Is it possible to get it orbiting without the slider-bars?
I've tried this and the motion stops dead.
I tried to set the global variables in Every Tick
from
Set orbit_width to width.Value
to
Set orbit_width to 0
it's okay, figured it out ;)