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 troubles:

Author
Message
Trashcanham
21
Years of Service
User Offline
Joined: 17th May 2003
Location: United States
Posted: 20th May 2003 02:47 Edited at: 20th May 2003 05:21
I have the camera following my object
and when I press left, the object rotates left
press right it rotates right

but, how can I get the camera to follow only the back of my object, so the camera spins around when my object spins?

(I'm using Darkbasic Lite)

sorry, no signature yet (o wait--uhh---nevermind)
Codingallmylife
21
Years of Service
User Offline
Joined: 22nd May 2003
Location:
Posted: 22nd May 2003 17:31
this is tricky because i don't know how you have tackled your problem. but i can help. the only thing is there r thousands of ways to tackle this problem.

i have done this lots of times but i can't really help you if don't know what your source code looks like. so if you want help then please cody your source code in to a word document then send the word document to - The_13th_warrior@hotmail.com - i can then view it and i will be able to help you garentied. i don't need your models or texture just your source code becasue i am not going to run your program.

haXor
21
Years of Service
User Offline
Joined: 12th May 2003
Location: United States
Posted: 23rd May 2003 00:59
its posted above.... just click the source button....

Sup Kids
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 23rd May 2003 01:49
download the walktest.zip here
it has a dba with camera control subroutines with media included so you can run it directly

http://www.realgametools.net/forums/index.php?board=3;action=display;threadid=15135;start=20

PS
this part is wrong :
a#=object angle x(2)
a#=object angle y(2)-100
a#=object angle z(2)
you can't store in the same angle variable (a#) the value of 3 different angles

and here:
a#=object angle y(2)-100
this is offsetting the angle by -100 so it can't stay behind

so here :
cx#=newxvalue(x#,wrapvalue(a#),-300)
cz#=newzvalue(z#,wrapvalue(a#),-300)
cy#=get ground height(1,cx#,cz#)
you should use the object angle instead that is aY# in your case
to stay behind the character
cx#=newxvalue(x#,wrapvalue(aY#),-300)
cz#=newzvalue(z#,wrapvalue(aY#),-300)
cy#=get ground height(1,cx#,cz#)
point camera x#,y#+5,z#

Login to post a reply

Server time is: 2024-11-24 14:26:30
Your offset time is: 2024-11-24 14:26:30