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.

DarkBASIC Discussion / roate planets ?

Author
Message
Eternal Darkness
21
Years of Service
User Offline
Joined: 12th Oct 2003
Location: Area 51
Posted: 5th Apr 2004 21:39
any sugestions ?

Thanks In Advance

It's Not The Cards Your Dealt , It's How U Play Them
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 5th Apr 2004 22:34
Uhm, please give more info. There's no way to know whether you mean a 3D object, a sprite, and what way you want to rotate it.

Its not a bug, its a feature!
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 5th Apr 2004 23:31
If it is 3D then work around this:

Hope that helps.

Current Projects: 'Level Editor 3D' and 'Animation Package v2.0'
[email protected]
Eternal Darkness
21
Years of Service
User Offline
Joined: 12th Oct 2003
Location: Area 51
Posted: 6th Apr 2004 00:01
@ Kentaree , sorry about that iv made that mistake many time before.

@adrew neale , thanks a lot my planet now rotates.

the next problem im having is that , when my player moves back u can see a hole in my 3ds planet i think its to do with my camera range which is only 900 i dont wont to increse that number 2 much because that blends in nicely with my fog and level.

It's Not The Cards Your Dealt , It's How U Play Them
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 6th Apr 2004 00:07
In that case you have 2 options, you can either increase the camera range somewhat, or decrease the distance of the fog.

Its not a bug, its a feature!
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 6th Apr 2004 01:02
Side note: andrew neale's code rotates 5 degrees per loop. If you want a constant speed on everyone's machine, you need to check out elapsed time per loop and use that to determine how much to rotate.



Eternal Darkness
21
Years of Service
User Offline
Joined: 12th Oct 2003
Location: Area 51
Posted: 6th Apr 2004 21:51 Edited at: 6th Apr 2004 21:52
@kentaree : Thanks , sorted

@zircher : 4 some reason the code u gave me does not work ? mybe i used it wrong



It's Not The Cards Your Dealt , It's How U Play Them
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 7th Apr 2004 00:34 Edited at: 7th Apr 2004 00:39
Well, the code looks the same so I can't tell from that fragment. Time to put on the trouble shooting hat and start printing values to the screen and see what is what.

BTW, "does not work" means "not very useful data". How is it not working?
--
TAZ

If...

planetAngle# = wrapvalue(planetAngle# + (5.0*(elapsedTime/1000)))

...is failing, remove the wrapvalue function and try it...

planetAngle# = planetAngle# + (5.0*(elapsedTime/1000))

... or perhaps elapsedTime/1000 is going integer and returning a zero...

temp# = elapsedTime
planetAngle# = planetAngle# + (5.0*(temp#/1000.0))

Eternal Darkness
21
Years of Service
User Offline
Joined: 12th Oct 2003
Location: Area 51
Posted: 7th Apr 2004 01:00
this code


now makes my planet rotate but it seems to be movin away and rotateing rather thaan rotating on its own ?

It's Not The Cards Your Dealt , It's How U Play Them
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 7th Apr 2004 01:47
Let's see more of the code involved, we're not psychic.

Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 7th Apr 2004 01:50 Edited at: 7th Apr 2004 01:51
*peeeeeeeep**peeeeep*

Why not:

yrotate object 1,wrapvalue(object angle y(1)+(60/screen fps()))

Btw, about the planet moving. If you made it using a 3D program instead, then its possible you haven't centered the planet on the origin.

Quote: "
UPDATED

Amd 2800+ 1024mb pc3200 A7N8X - Deluxe Ati Radeon 9800PRO 256mb
"
Eternal Darkness
21
Years of Service
User Offline
Joined: 12th Oct 2003
Location: Area 51
Posted: 8th Apr 2004 15:39
@emperor baal : Thanks your code works perfectly , and my planet not longer moves the only problem now it that insted of rotating in the same position it now orbits ?

It's Not The Cards Your Dealt , It's How U Play Them
MrNick
21
Years of Service
User Offline
Joined: 23rd Feb 2004
Location:
Posted: 12th Apr 2004 22:50
uh and i though people here were smart...
why don't you use the turn object right\left commands???
for example:

really...

where planetobj is the object number of your planet
and i dont mean to insult anyone by this post

Make games!
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 12th Apr 2004 23:56
No insult taken since your code is even more stupid.

You set up a 10th second delay and then it rotates 10 degrees per loop. Not very clever, eh? I guess you forgot to reset stime when you kicked off a rotation.
--
TAZ

Login to post a reply

Server time is: 2025-05-30 14:55:09
Your offset time is: 2025-05-30 14:55:09