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 / Quick Camera Question

Author
Message
GMONEY34
13
Years of Service
User Offline
Joined: 19th Apr 2010
Location:
Posted: 19th Apr 2010 19:51
I'm new to DarkBasic and I have found various examples and I have put them together and I have a question. I'm not resturning any errors but I have a question with the camera. I tried setting the range of the camera but it dosen't seem to work. My question is how can I get rid of the objects disapperaing? It seems that I can not see the other side of the world into I get close to it and I would like to turn that off so I can see everything. Code Attached...



- Your creativity is only limited by YOUR imagination.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 19th Apr 2010 21:07 Edited at: 19th Apr 2010 21:14
Normally, users have this problem because they think too big when creating the world and all the objects in it.

3D world units aren't fixed like inches, feet, centimetres or metres - they are relative and the player's brain decides the size of the world they are looking at by the size of the objects in it.

I always quote my story about an ordinary cube in created in Dark Basic with a size of 1. Looking at it, you've no idea how big it is as the brain has nothing to compare it with.

Now place a model of an elephant standing on top of it and your brain now sees a huge cube.

Replace the elephant with a model of an ant and suddenly the cube is now incredibly small - even though in DB the physical size of the cube hasn't changed. Our brains know how big an elephant and an ant is and use that to evaluate the size of the cube.

So, you could have a world only 500 x 500 3D units in size (which removes any camera distance problems) but still looks huge simply by scaling down all the object's sizes - and of course the camera moving distance.

You don't have to move an object 1 3D unit at a time - as 3D co-ordinates are float values, you can move the camera .001 of a unit to get the same speed as moving 1 unit in a world a thousand times bigger.

But, if you don't mean what I thought you meant, it might simply be a case of you needing to use the Set Camera Range command...

TDK

GMONEY34
13
Years of Service
User Offline
Joined: 19th Apr 2010
Location:
Posted: 20th Apr 2010 19:52
I understand completely what you mean, though I'm rather curious on how the Set Camera Range Command works. Never mind, you have guided me to my error! It seems that I was using the Set Camera Range as a sub but I have forgot to call the sub. Thanks!

- Your creativity is only limited by YOUR imagination.

Login to post a reply

Server time is: 2024-03-28 14:14:47
Your offset time is: 2024-03-28 14:14:47