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 Discussion / Camera issue

Author
Message
Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 2nd Apr 2008 00:16
hello can enny one help me to get the innbult camera to stopp when it colide with the X cordinates(CX) and Z cordinates (CZ)
inn the teory i have tested this code out..
sorry i have non code i have deleted that dbc file i yoused my code to test

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://dashboard.filefront.com/StigDesign/
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 2nd Apr 2008 11:50
It depends on what you want to do.

One way is to check where the camera is, compare it's position to CX and CZ, and then set it to that position if it tries to move past it.



Enjoy your day.
Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 2nd Apr 2008 22:29
Thank you Latch i am going to try that than you

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://dashboard.filefront.com/StigDesign/
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 3rd Apr 2008 02:48 Edited at: 3rd Apr 2008 02:50
To use the in-built camera collision with the Set Camera To Follow command you have to set up static collision boxes.

Another method is to create a cube object and position it at the camera position then check the cube object for collision with other objects. These can be invisible objects like plains and cubes on the terrain where you want to stop the camera going.

If you have to move the cube after a collision, set the camera to the cube's new position at the same time.

TDK_Man

Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 3rd Apr 2008 06:10
Thank`s TDK_man

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://dashboard.filefront.com/StigDesign/

Login to post a reply

Server time is: 2025-06-04 03:19:33
Your offset time is: 2025-06-04 03:19:33