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 / Screen Size

Author
Message
Stevie
User Banned
Posted: 26th Jul 2004 12:31
This might sound a little odd - but when i use the move object command and increase its y by a small ammount the item disapears off the screen?? How can this be. I thought the object placement was based on the screen resolution?? Hense if i am using 1280 by 1024 then by increasing or decreasing by 1 would do just that off the screen resolution and thus move my object until >1280 or less than is achieved and then i know the object would disapear. Why is it when i increase the Y pos after only a few counts my object disapears??/
raar
20
Years of Service
User Offline
Joined: 9th Jul 2004
Location:
Posted: 26th Jul 2004 18:45
yeah i have that problem too
besides it looks like it doesn't matter if you put the screen in a higher resolution the objects always have the same size. it only helps to move the camera back.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Jul 2004 22:14
3D positioning has nothing to do with your screen resolution. All that the screen resolution does is determine the level of detail that things can be rendered at.

If you want things to be displayed at a different size, then change the distance between the camera and your objects instead.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
raar
20
Years of Service
User Offline
Joined: 9th Jul 2004
Location:
Posted: 26th Jul 2004 22:35
k thanks
but is there any way to know how "big" you screen is when you place the camera, so for example if you place the camera at 0,0,-20 and you make a box object of 1,1,1 how far to the left can you move it before it starts going off the screen that you can see?
Stevie
User Banned
Posted: 26th Jul 2004 23:44
Re Ians comments..

yeah but in a nutshell why is it when i move the obect only one or two increments - it disapears???? Okay ts nothing to do with screen resolution - but how is the screen actually comprised of grid wise???/ what is the screen grid size when moving objects - as i say i only have to move slightly and the object disapears???

Thanks, Steve
raar
20
Years of Service
User Offline
Joined: 9th Jul 2004
Location:
Posted: 27th Jul 2004 00:29
Steve did you put a camera at a specific point
otherwise insert this into your main gam loop:
position camera 0,0,-20
Stevie
User Banned
Posted: 27th Jul 2004 03:10
Hi - thanks for your last comments - but i am afraid no one is quite getting to my point....

Why is it when i place an object on the screen, do i only have to increase it y coord a bit - and then it disapears. It is as if the screen is set up for something like a 8x8 grid (note 8x8 just said for reference) but it does seem very small. Surely it would run into hundreds of incrementing before an object goes off screen>?

Steve
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 27th Jul 2004 03:16 Edited at: 27th Jul 2004 03:26
It's all to do with scale. If you use MAKE OBJECT CUBE 1,1 it will plonk a cube with each side measuring 1 3D unit. DBPro defaults to positioning camera so it is pointing at any new objects automatically and so the object fills the screen. So an object of size 1*1*1 unit only has to move a couple of units left or right and its out of the camera's vision. If however you stick AUTOCAM OFF at top of program and then position camera manually it will make things clearer. You can of course move objects by fractions like 0.01 and it will move nice and slowly.

Here's some nice and easy code to move a block around a matrix.




Boo!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Jul 2004 03:28
The simplest way that I can answer this - a piece of example code



Use the up/down keys to move the plain away or towards the screen, and left/right to move in steps in those directions.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
Stevie
User Banned
Posted: 27th Jul 2004 03:50
Thanks guys - u have made it click!!!! I undertstand now, that the object would only have a few cents to move cos of the camera setting. I totally understand now

Its a great feeling when that happens!!!!!

Now can anyone answer my other question about making an animated object stop gradually when i take my fingers off the movement buttons - rather than it coming to a complete and un-natural halt. Basically i want it so when the keys are released, for a second or so, the object just seems to move and stop naturally.
Stevie
User Banned
Posted: 28th Jul 2004 05:44
Hi I entered Ians Code - but another problem posed itself - when i changed the cube object for one of my .x models it wouldnt display???????????????

These simple problems are causing me a lot of grief ... Please HELP

Login to post a reply

Server time is: 2024-09-22 18:31:00
Your offset time is: 2024-09-22 18:31:00