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 / object disapearing problem (DBC Enhanced)

Author
Message
Exile
18
Years of Service
User Offline
Joined: 25th Aug 2006
Location:
Posted: 26th Aug 2006 21:24
i have a problem with an object i want to put into my "game"
it looks like the matrix "eats" the object i loaded into the game.
when i start a new project without a matrix to see if i can load the object, it doesn't disapear.
also, the append command prepares more data for an object right?
how do you play the data appended? al i was able to do was load an object, append the *moving* data, but it won't switch from idle to moving .
i've attached the coding i was able to do so far, please help!

Attachments

Login to view attachments
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 27th Aug 2006 01:24 Edited at: 27th Aug 2006 01:25
Your problem is simple: firstly, unrelated to your problem, you may want to add "SYNC ON" and "SYNC RATE 0" at the start of your program. That'll make that SYNC in your loop work properly. Secondly, to fix your problem, you need AUTOCAM OFF. By default, whenever a new 3D item is created, the camera will position itself accordingly to see as much of the new item (let it be an object or a matrix) as it can. This is called the AUTOCAM. Use AUTOCAM OFF to turn this feature off. When you turn this off, however, the camera will be put at the origin of your world, or 0,0,0. This is where all objects are placed as well. You can reposition objects using POSITION OBJECT and you can reposition objects, and you can reposition the camera using POSITION CAMERA. Position the camera accordingly so that you can see your object.

Exile
18
Years of Service
User Offline
Joined: 25th Aug 2006
Location:
Posted: 27th Aug 2006 11:42
hmm, thanks for the tip about the sync, the program works a lot faster now, but i still have the problem with the object, i'll just let the program speak for itself, i updated it with your instructions.

Attachments

Login to view attachments
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 28th Aug 2006 02:46
Those objects are tiny
add this:

LOAD OBJECT "l-knight-idle.x",1
> scale object 1,10000,10000,10000

and:
POSITION OBJECT 1,5100,0,5100

so it's close to the camera

autocam off goes at the top of the program:


and lower the camera a bit:
rem camera position
POSITION CAMERA 5000,100,5000

wrapvalue should be used like this:

IF LEFTKEY()=1 then angle#=wrapvalue(angle#-3.0)
IF RIGHTKEY()=1 then angle#=wrapvalue(angle#+3.0)

that's all
cheers

Login to post a reply

Server time is: 2024-09-25 07:37:53
Your offset time is: 2024-09-25 07:37:53