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.

DarkBASIC Professional Discussion / Pitch object up/set camera to object orientation issue..

Author
Message
Lampton Worm
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 27th Nov 2002 00:15
Hi there Whats the best way to stick a camera to an object that is moved about using the free flight (pitch/roll/turn) commands ? I figured placing the camera on the object and using "set camera to object orientation" would work.. but (I've got DBP+Patch3) the following test code doesn't play ball. The camera appears to have a curved accel/decel, hold down up for example and the longer you hold the faster it spins. Hold down and it curves back until it spins the other way. Plus it doesn't match the object's pitch. Perhaps I'm using the command wrong or the wrong command to achieve the desired effect ?

Thanks in advance.


sync on:sync rate 100:hide mouse
make object box 1,4,1,20
do
move object 1,0.002
if upkey()=1 then pitch object up 1,0.02
if downkey()=1 then pitch object down 1,0.02
position camera object position x(1),object position y(1)+5,object position z(1)
set camera to object orientation 1
sync
loop
Lampton Worm
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 27th Nov 2002 15:56
...anyone ? Thanks.

Login to post a reply

Server time is: 2024-05-07 05:48:23
Your offset time is: 2024-05-07 05:48:23