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 Help

Author
Message
Cpt Caveman
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: New Zealand
Posted: 4th Sep 2003 08:21
Can someone please help me, I want to only rotate the camera when the right mouse button is pressed, but its recording when the mouse is moved and jumping to the new coords when the rmb is pressed, I want it to stay where it is when the rmb is pressed then be able to move around. Sorry its hard to explain.
ChipOne
22
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Canada
Posted: 4th Sep 2003 21:00
hey, i'd be glad to help if we can get some more specifics on what you're trying to do. in fact, you will probably be able to help yourself a fair bit if you write your problem out in psuedo-code.

is this what you're trying to do:

if right_mouse_button is pressed
move as per input from the user
else
don't move camera around
endif

by 'record' are you meaning to store this information in a file? in an array? just to actually move the camera?

cheers

-= i only do what my rice krispies tell me to do =-
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 4th Sep 2003 21:02
just wrap your mouse movements in a condition test, within the main loop:


intMouse as Integer
intMouse=Mouseclick()
if intMouse=2
...do whatever...
endif

-RUST-
Cpt Caveman
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: New Zealand
Posted: 5th Sep 2003 00:50
OK, Im doing an editor, but with my own camera movement style that I like, I want to be able to move backwards and forwards, left and right with the cursors. The camera will only rotate when the RMB is pressed allowing me to move the mouse cursor over to the control panel on the left without the camera rotating, The problem is the camera seems to remember when the RMB hasnt been pressed so it jumps to where the mouse cursor has been, not where it currently is. Thats the best I can explain it.
Cpt Caveman
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: New Zealand
Posted: 5th Sep 2003 16:52
Right Ive fixed it, thanks for the help CattleRustler
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 5th Sep 2003 17:18
Glad to help


-RUST-

Login to post a reply

Server time is: 2024-09-20 21:39:24
Your offset time is: 2024-09-20 21:39:24