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 and object help

Author
Message
Trashcanham
21
Years of Service
User Offline
Joined: 17th May 2003
Location: United States
Posted: 18th May 2003 00:13
Why can't I move the camera and an object at the same time?




Thanks to all who reply to this
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 18th May 2003 00:59
your cx#,cy# and cz# values must be relative to the object position if you want the cam to follow it when it moves
Trashcanham
21
Years of Service
User Offline
Joined: 17th May 2003
Location: United States
Posted: 18th May 2003 01:23
Could someone please post a code to make the camera follow an object?

Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 18th May 2003 01:40
x#=object position x(1)
y#=object position y(1)
z#=object position z(1)
a#= object angle(1)

rem Position camera to the back of the character
cx#=newxvalue(x#,wrapvalue(a#),-300)
cz#=newzvalue(z#,wrapvalue(a#),-300)
cy#=get ground height(1,cx#,cz#)
position camera cx#,cy#,cz#
rem Point camera at object
point camera x#,y#,z#
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 18th May 2003 01:42
you may have to keep the cam a bit higher with this :

position camera cx#,cy#+100,cz#
Trashcanham
21
Years of Service
User Offline
Joined: 17th May 2003
Location: United States
Posted: 18th May 2003 02:07
Thanks

Login to post a reply

Server time is: 2024-11-24 15:10:05
Your offset time is: 2024-11-24 15:10:05