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 control

Author
Message
Cemetery Ridge
17
Years of Service
User Offline
Joined: 23rd Mar 2007
Location:
Posted: 2nd Apr 2007 04:15
What code can i put in to make the camera follow the object for staffing and turning
for turning ive tried SET CAMERA TO FOLLOW but it didnt work out
what code can i use to make it work
also i need the camera behind and above the left shoulder





Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 2nd Apr 2007 04:36
SET CAMERA TO FOLLOW doesn't like the TURN OBJECT LEFT/RIGHT commands. You'll have to use Yrotate object in combination with WRAPVALUE (keeps a number between 0 and 360) to make the object turn. Then SET CAMERA TO FOLLOW will work.

Ex.

YRotate Object 1,WRAPVALUE( Object angle y(1)+1 )

for turning right.

Cemetery Ridge
17
Years of Service
User Offline
Joined: 23rd Mar 2007
Location:
Posted: 2nd Apr 2007 04:50
i tried that code but it didnt work
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 2nd Apr 2007 05:44
http://www.computechtenerife.com/db.htm

Follow the link above and choose the Code Hints button on the left.

At the bottom of the screen you will see a menu with number of camera control methods (including working example DB code).

TDK_Man

Cemetery Ridge
17
Years of Service
User Offline
Joined: 23rd Mar 2007
Location:
Posted: 3rd Apr 2007 00:44
what can i fix in this code to make it so if the mouse is moving left it will say left and if its moved right then it will say right

el zilcho
17
Years of Service
User Offline
Joined: 4th Dec 2006
Location:
Posted: 3rd Apr 2007 01:54 Edited at: 3rd Apr 2007 01:55
just this




---> = x


^
|
| = y
|

first it needed to be mousemovex(). that's the left/right direction

also, the mousemove commands return how far the mouse has moved in the x or y since the last loop, they don't return a 1 or 0 flag telling whether or not they have moved.

-EZ-
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK

Login to post a reply

Server time is: 2024-09-25 21:29:29
Your offset time is: 2024-09-25 21:29:29