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.

Dark GDK / EZrotate Solar System Dilemma

Author
Message
entomophobiac
22
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 11th Oct 2009 18:03
I've been struggling with a problem following my EZrotate implementation in the GDK for several days, by now.

The main functionality works -- one planet circling another -- but whenever the hierarchy is expanded; i.e., when I add a moon to a planet that is circling another planet, it provides very strange results.

Summary:

Sun -> Earth; works perfectly.

Sun -> Earth -> Moon; the Moon seems to refer to several chains of data and is rotated in an extremely strange manner.

I was hoping that someone may be seeing what I'm doing wrong. This is the only place in the code where EZrotate is used and what I'm thinking is that it may be caused by my method for iterating the Vector that holds a parent's children...

But I just can't beat it.


entomophobiac
22
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 12th Oct 2009 10:43
Does WOLF no longer frequent these forums? He used to be superb with replying to errors with his plugins. Have I posted in the wrong forum, perhaps?
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 12th Oct 2009 13:25
Quote: "Does WOLF no longer frequent these forums?"


I'm still here
I also got your e-mail. You have just caught me at a bad time! I've just had a really busy weekend. I'll see if I can look into your code soon!

Ron


a.k.a WOLF!
entomophobiac
22
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 12th Oct 2009 22:20
Bad time or not -- I'll simply wait for your answer and deal with other issues in the meantime.
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 13th Oct 2009 19:36
I just had a look at your code. The main problem is that ALL child objects of a parent need to be updated when a parent is orbited.

I didn't have time to setup a GDK project, so I just prototyped something in DBpro real quick. It doesn't use types or recursive functions, but it works and should be enough to give you an idea of what you need to do. I hope this helps!




a.k.a WOLF!
entomophobiac
22
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 13th Oct 2009 23:13
Huge thanks! I absolutely neglected the fact that I needed to update all children with the same movement as that of the parent.

A simple thing to rewrite it to work properly, actually.

Thanks for taking the time to answer my question! Definitely proves that your presence or willingness to help hasn't changed since before.
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 14th Oct 2009 01:44
No problem! I'm glad to help


a.k.a WOLF!

Login to post a reply

Server time is: 2024-11-19 06:01:17
Your offset time is: 2024-11-19 06:01:17