Howdy all, relatively new to DBPRO. I need something explained to me because I can't figure out why this is happening. In the following code:
// SET DISPLAY MODE Width, Height, Depth, VSyncOn, Multisampling Factor, Multimonitor Mode
set display mode 1600,900,32,1,8,0
set window on
autocam off
backdrop on 0
color backdrop 0,rgb(0,0,0)
MAKE OBJECT SPHERE 1,5,50,50
position object 1,0,0,200
POSITION CAMERA 0, 0, 0, 200 - 10
// *****************************************
// ESTABLISH THE CAMERAS USED IN THE GAME
// SET PLAYERS CAMERA SETTINGS
// SET CAMERA VIEW 0, 50, 50, 1550, 800
SET CAMERA ASPECT 0, 1.85
SET CAMERA FOV 0, 60
SET CAMERA RANGE 0,1,10000
DO
// ALL KEYSTROKES TRAPPED IN MAIN LOOP
if keystate(205)=1 then INC TurnThrusters#, .002
if keystate(205)=0 and TurnThrusters# > 0 then DEC TurnThrusters#, .001
if keystate(203)=1 then DEC TurnThrusters#, .002
if keystate(203)=0 and TurnThrusters# < 0 then INC TurnThrusters#, .001
if keystate(200)=1 then INC PitchThrusters#, .002
if keystate(200)=0 and PitchThrusters# > 0 then DEC PitchThrusters#, .001
if keystate(208)=1 then DEC PitchThrusters#, .002
if keystate(208)=0 and PitchThrusters# < 0 then INC PitchThrusters#, .001
//********************************************************************************
// CONTROL THRUSTERS
if TurnThrusters# > .4 then TurnThrusters# = .4
if TurnThrusters# < -.4 then TurnThrusters# = -.4
if TurnThrusters# > -.002 AND TurnThrusters# < .002 then TurnThrusters# = 0
if PitchThrusters# > .4 then PitchThrusters# = .4
if PitchThrusters# < -.4 then PitchThrusters# = -.4
if PitchThrusters# > -.002 AND PitchThrusters# < .002 then PitchThrusters# = 0
// MOVE CAMERA (PLAYER SHIP SIMULATED MOVEMENT)
TURN CAMERA RIGHT Player$.CAMERA, TurnThrusters#
PITCH CAMERA UP Player$.CAMERA, PitchThrusters#
LOOP
I am playing around with X, Y, and Z positions for objects. When an object stays within the bounds of -10000,-10000,-10000 -> 0,0,0 <- 10000,10000,10000 the object remains stable. However, when I increase the distance of the object from the origin point of 0,0,0 the object starts to become unstable while the camera is moving. Go out to say 0,0,300000 and position the camera so the distance from the object to the camera is close and you'll notice as you move the camera the object starts to bounce around. It doesn't remain stable on the x,y,z position that you gave it. Can someone explain why this is? Please, no smartass answers, I'm new to 3D programming and I realize I have a lot to learn. I thank you for your time in reviewing this issue for me.
- A man from nowhere, prophesized to fail, blazed beyond the brightest of them all.