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 / How to make de free camera

Author
Message
Kiwi thereturn
16
Years of Service
User Offline
Joined: 19th Sep 2008
Location:
Posted: 19th Sep 2008 16:03
Hello,

I'm starting DBP and I need to make a free camera moving in X, Y, Z.

Keys Up and Down to forward and backward
Keys Left and Right to move left or right (slide and not rotate)
And I would like to be able, with the mouse, to rotate the camera on 2 axes only when I click on the right button.

I don't find an exemple to do this and everything I tried didn't work.

Can you help me ? I'm sure it's not very difficult.

Thank you by advance.
andycb
16
Years of Service
User Offline
Joined: 12th Jan 2008
Location:
Posted: 19th Sep 2008 22:21 Edited at: 19th Sep 2008 22:22
this should help you a bit and which two axis do you want to rotate the camera on?

Kiwi thereturn
16
Years of Service
User Offline
Joined: 19th Sep 2008
Location:
Posted: 22nd Sep 2008 15:39
Thank you very much.
The code works fine.

For the mouse I think it's X and Y axis.
Kiwi thereturn
16
Years of Service
User Offline
Joined: 19th Sep 2008
Location:
Posted: 22nd Sep 2008 17:24
Any idea how to do this ?
Kiwi thereturn
16
Years of Service
User Offline
Joined: 19th Sep 2008
Location:
Posted: 23rd Sep 2008 18:23
I tried this :

xrotate camera wrapvalue(camera angle x()+mousemovey())
yrotate camera wrapvalue(camera angle y()+mousemovex())

But it doesn't work

Login to post a reply

Server time is: 2024-09-27 20:21:50
Your offset time is: 2024-09-27 20:21:50