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.

Newcomers DBPro Corner / about getting camera rotation synced with controls keys

Author
Message
darkvee
19
Years of Service
User Offline
Joined: 18th Nov 2005
Location:
Posted: 18th Sep 2007 16:18
`player
x2 = camera position x(player)
z2 = camera position z(player)
y2 = get ground height(1,x2,z2)

cam_ang_x# = wrapvalue(cam_ang_x#+mousemovex()*1.0)
cam_ang_y# = wrapvalue(cam_ang_y#+mousemovey()*1.0)
rotate camera player,cam_ang_y#,cam_ang_x#,0

if upkey()=1 then position camera player,x2,y2,z2+1
if downkey()=1 then position camera player,x2,y2,z2-1
if leftkey()=1 then position camera player,x2-5,y2,z2
if rightkey()=1 then position camera player,x2+5,y2,z2

Kolp try72y
dark donkey
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 18th Sep 2007 18:56
What, what do you wnat you didnt say anything. What do you wnat us to help with?. Sorry that sounded mean but we dotn know what you want. Please post on what you want us to help with.
darkvee
19
Years of Service
User Offline
Joined: 18th Nov 2005
Location:
Posted: 19th Sep 2007 09:14
Hi, Sorry I forgot to tell you, silly me lol.

The way my camera and controls work, is say I got a tank. I press up to move forward and using the mouse I control the gun on top of the tank. Thats how my controls are. I need my controls too do this.

If press up and move the camera the upkey always gos and synced to mouse movement
so it acts like a real first person shooter then a tank game. get it?

Kolp try72y

Login to post a reply

Server time is: 2024-11-25 11:29:33
Your offset time is: 2024-11-25 11:29:33