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 / darkbasic pro

Author
Message
the destroyer
15
Years of Service
User Offline
Joined: 24th Dec 2008
Location:
Posted: 25th Dec 2008 14:19
Hi can somebody tell me how to use the set camera to follow command....
thanks
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 27th Dec 2008 02:39 Edited at: 27th Dec 2008 03:38
Set Camera To Follow - Parameters:

X - This is the X-coordinate of the object you want to follow. It's typically obtained using Object Position X( ID ) where ID is the object you want to follow.
Y - Like above, but for the Y-coordinate.
Z - Like above, but for the Z-coordinate.
Angle - The Y-angle of the object you want to follow. It's typically obtained using Object Angle Y( ID ) where ID is the object you want to follow.
Distance - This is the distance you want the camera to be from the object you're following. Higher values will put the camera farther back.
Height - This is the height you want the camera to be at when following your object. If you set it to a higher value it'll give you a more "top-down" camera style, and a lower value will put the camera behind the character's back.
Smooth - This is the smoothness of the camera when moving. If you use a low value, the camera will follow right behind the object and sway very little. If you set it higher, the camera will lag behind more. Higher settings are more useful in racing games where the smoothness is desired, whereas lower values are better used in RPGs and TPSs where you want the camera to be right behind the character at all times.
Collision - This is a flag which can be set to make the camera adjust itself so that it never collides with your world. It probably won't be useful to you if you're using Sparky's Collision.

Just put the command somewhere in your main loop where it will be called each loop.

Pillarofire
20
Years of Service
User Offline
Joined: 31st Dec 2003
Location: Good Question, <looks around.>
Posted: 27th Dec 2008 03:34
Forgive me if this is a little off-topic.

@AndrewT - That is the kind of help that helps people out. Very thorough and very accurate. Nice Job.
the destroyer
15
Years of Service
User Offline
Joined: 24th Dec 2008
Location:
Posted: 29th Dec 2008 14:24
thanks brother, it really works

Login to post a reply

Server time is: 2024-09-28 00:19:10
Your offset time is: 2024-09-28 00:19:10