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 / Need a little bit help with simple camera movement loop

Author
Message
157488
15
Years of Service
User Offline
Joined: 6th Apr 2009
Location:
Posted: 7th Apr 2009 22:58
hello, I'm new to Dark GDK and I would like some help

I'm making an 3D application and I made a scene, everything is set up, but I would like to slowly move the camera to the right on the X-axis and back to the left in a loop, but I don't know the coding, can someone help me please and give an example code for this so I can adjust it myself, would be highly apreciated
157488
15
Years of Service
User Offline
Joined: 6th Apr 2009
Location:
Posted: 8th Apr 2009 18:05
or wait, i think i mean the Y-axis
Xoddam
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location:
Posted: 12th Apr 2009 08:25 Edited at: 12th Apr 2009 08:33
to control the movement, in your while( LoopGDK () ) you want to check to see if the user pushes a button. i would use something like this:



if you want it to go left or right, just change the up to right and the down to left. if you do that, be sure to take out the negative (if you dont, it will move the camera to the right)

let me know if you need anything! if i dont answer after a few days, try commenting on one of my threads and reminding me. i'll probably forget
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 12th Apr 2009 18:25
Try this:


100 is the max and lowest height that the camera will move.

I'm poetry in motion
xiva
15
Years of Service
User Offline
Joined: 16th Apr 2009
Location:
Posted: 16th Apr 2009 19:27
Im a noob aswell only started today but could you not just

0.5 = speed you move
1.8 = speed you turn

"Lifes like a box of chocolates, you never know which one you get" Forest Gump
Unless you read the leaflet, thats why hes so "different"

Login to post a reply

Server time is: 2024-09-30 23:13:45
Your offset time is: 2024-09-30 23:13:45