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 / dbYRotateCamera in a loop

Author
Message
Fr4gory
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location:
Posted: 8th Apr 2009 21:36
hello,

I've been trying to use dbYRotateCamera in a loop, but I don't know exatcly how

I tried to put dbYRotateCamera in a loop, for example "dbYRotateCamera(+100)", but then it would only go to "+100" one time, I understand that, but what I need help with is a proper way to put it in the loop, the goal is to keep the camera slowly rotating around in an infinit loop, so each time it goes to the loop it should add +1 to the dbYRotateCamera position, but unfortunaly I don't know how, can someone please help me with this?

Thank you

Michel Cilissen - CiliSoft Software Solutions
michel@techblog24.com - http://www.cilisoft.tk
prasoc
16
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 8th Apr 2009 21:49
at the top put:
"int yRotate = 0;"

and in the main loop:



that should make it rotate infinitely.
Fr4gory
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location:
Posted: 8th Apr 2009 21:54
first of all, thank you very much, works perfect, but is it possible to slow it down half? i've been trying to do it myself, but without results. Help would be highly apreciated

thank you

Michel Cilissen - CiliSoft Software Solutions
michel@techblog24.com - http://www.cilisoft.tk
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 8th Apr 2009 21:57
Make yRotate a float instead of an int, and instead of 'yRotate++' use 'yRotate += 0.5f'

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
ABXG
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Canada
Posted: 8th Apr 2009 21:59
This will slow the rotation to half of what it is listed above.



------------------------------------
Currently developing an "over-the-shoulder", action based, RPG with combat based on rag-doll physics.
Fr4gory
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location:
Posted: 8th Apr 2009 22:03
works great, thank you very much

Michel Cilissen - CiliSoft Software Solutions
michel@techblog24.com - http://www.cilisoft.tk

Login to post a reply

Server time is: 2024-11-25 14:52:09
Your offset time is: 2024-11-25 14:52:09