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 / Camera Movement

Author
Message
Black Angel
17
Years of Service
User Offline
Joined: 20th Apr 2007
Location:
Posted: 3rd May 2007 00:21
I have this code ... how do I convert it so that I obtain a full 3d view? For example, when my mouse points to a certain point, I want to "fly there", not "walk there". So if I am looking towards the sky, when I press "W" I want to fly to that point, lift off from the earth and blast ... you get the idea

Windsept
18
Years of Service
User Offline
Joined: 9th Jun 2006
Location: United States
Posted: 3rd May 2007 03:01
You could use the pick screen command using the mouse x and y coordinates with the certain distance you want.

Then you could retrieve the data using the get pick vector x/y/z() command and move the camera there from your current position in a flying type of matter.

I hope this is what you are looking for.
Black Angel
17
Years of Service
User Offline
Joined: 20th Apr 2007
Location:
Posted: 3rd May 2007 04:02
No, not quite

I have a FPS movement routine like W and S for forward and backward, A and D for strafing and the mouse to look. Instead of W going always forward, on the ground, I want to go in whatever direction the mouse is pointing at, even if it means detaching from an advanced terrain. Some sort of free view 3d camera look.
Ankillito
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Litigious California
Posted: 3rd May 2007 07:10
Check into pitch object up, turn object right, etc. Then, when you want to move forward, just type move camera 1

P.S. Next time, post stand-alone code.

"There will always be evil, for, without evil, the good shall lose their virtue."
Black Angel
17
Years of Service
User Offline
Joined: 20th Apr 2007
Location:
Posted: 3rd May 2007 21:10 Edited at: 4th May 2007 02:12
I basicly want to blast off from ground and admire the terrain from above and rotate the camera from above as much as I like in any direction. That's all. Here is the downloadable code.

Attachments

Login to view attachments
Ankillito
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Litigious California
Posted: 4th May 2007 07:20
The downlaod is a start, but what I had meant was a stand-alone code snippet of only the relevant parts.

If you want to rotate the camera in any direction, I would try something base on mouse movements. Try this:



"There will always be evil, for, without evil, the good shall lose their virtue."

Login to post a reply

Server time is: 2024-11-25 19:46:16
Your offset time is: 2024-11-25 19:46:16