Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / Making one sphere orbit another

Author
Message
Dippy Hippy
21
Years of Service
User Offline
Joined: 29th Dec 2004
Location: Lawton, OK
Posted: 30th Dec 2004 05:15
Hi everyone

I'm new to DarkBASIC and new to the forums too. To cut a long story short, I figured I'd start with something simple for my DarkBASIC project and wanted to see if I could build a model of the solar system.

Obviously, creating the planets, moons and asteroids and getting them to rotate is pretty simple and straightforward, but does anyone know how to get the planets to orbit the Sun and the moons to orbit the planets?

I've had a quick look through the manual and couldn't find anything - likewise I did a search on the forums and although someone asked the same question some 8 months ago, no one replied, so I'm hoping someone might now have an answer...

Hope you can help

Dips

"All those moments will be lost, in time... like tears in the rain...
Philip
23
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 30th Dec 2004 06:14
Hi Dips

If you do a search of the codebase or the code snippets forum you will find some examples of how to make solar systems / planets rotate around the sun. I say this because over the past few years some people have run some solar system modelling projects.

Actually getting an object to rotate around another is fairly simple. Its just a matter of basic trig. You can use the newxvalue and newzvalue commands to achieve this.

Cheers

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
Cookyzue
22
Years of Service
User Offline
Joined: 12th Oct 2003
Location: Who Cares?!
Posted: 30th Dec 2004 07:19
heres a thread about it:
http://forum.thegamecreators.com/?m=forum_view&t=44693&b=1


Current Project: Goonder Mania
MCK Games
IanG
21
Years of Service
User Offline
Joined: 25th Sep 2004
Location: Cyberspace
Posted: 30th Dec 2004 19:33
or if you don't fancy trig, there is EZrotate, which has an orbit function

Used to be Phoenix_insane registered in september 2003 despite what the date says to the left <--
PC - amd athlon 2.0ghz, 512mb, GeForce FX 5200 128mb, 200gb, xp pro sp2
Dippy Hippy
21
Years of Service
User Offline
Joined: 29th Dec 2004
Location: Lawton, OK
Posted: 30th Dec 2004 22:18
That's great - thanks guys

Like I said, I'm new to this and the forums so I don't know about all the commands. I was a bit worried too about being a newbie in a forum because I know what it can be like if I'm asking an obvious question: some people would roll their eyes and say "like we haven't been asked this 1,000 times before"

So thanks for all your help and your patience - it's very much appreciated

"All those moments will be lost, in time... like tears in the rain...
Philip
23
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 31st Dec 2004 03:49
Its always a good idea to do a few searches beforehand. You may find it saves you a lot of time!!

Cheers

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home

Login to post a reply

Server time is: 2026-07-11 13:00:06
Your offset time is: 2026-07-11 13:00:06