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 / Odd camera/object problem

Author
Message
Radio Check
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location:
Posted: 30th Aug 2004 22:29
When I use this function to load a ship and a box, the camera works right, it is positioned at 0,0,0 and sees things near it as really large.

When I change the comment to load the cannon, another object made in Rhino and exported to 3ds like the ship was, the camera changes. It suddenly seems to be about -100 Z

I have remade the cannon in case there was something wrong with the 3ds file, like maybe I accidently selected an odd piece way in the distance to export, but it all seems the same.

I tried explicitly setting the camera rather than trusting the default. No help.

Anything else I could try? thanks.

Making a cool sig is just too much pressure for me right now.
Dodo
20
Years of Service
User Offline
Joined: 8th Aug 2004
Location: eating lunch
Posted: 30th Aug 2004 22:37
Any code /media you could give would be useful. Im not sure but you could try using the scale object command to make the cannon smaller/ship bigger
Zokomoko
22
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 30th Aug 2004 22:46
i'm not sure what is the problem.

you say the camera moves when you load an object ?
autocam off

or if he object's pieces are in strange places, you should export it to .x format, as .3ds creates lots of problems.
Radio Check
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location:
Posted: 30th Aug 2004 22:49
Sorry, meant to post the code but forgot....

Here is the function, i call it before the main program loop and the loop just moves things around with a joystick.

Actually there is another problem, not connected with this, is that I can use "pointlight" to aim my spotlight just fine, but cannot use "point object" to aim my cannon.

I'd better post the whole code. I don't know how to post the objects, but if you can get it to work with your objects, we will have found the problem.

Making a cool sig is just too much pressure for me right now.
Radio Check
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location:
Posted: 30th Aug 2004 22:53
OK, autocam fixed the first problem! Thanks.

Now... why won't my cannon "point" at my ship?

Making a cool sig is just too much pressure for me right now.
Zokomoko
22
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 30th Aug 2004 22:57
if you're using DBPRO, look at its help files, you should find many usefull commands.

1 will be your ship object number
2 will be your cannon object number

point object 2,object position x(1),object position y(1),object position z(1)

the point command points an object to a specific 3d coordinates.
Radio Check
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location:
Posted: 30th Aug 2004 22:59
Quote: "point object 2,object position x(1),object position y(1),object position z(1)"


That's exactly what i did, and although it works for my lights (point light) it just doesn't do anything for my object (point object)

Making a cool sig is just too much pressure for me right now.
Zokomoko
22
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 31st Aug 2004 00:06
you should make sure, the cannon is faced in the right direction when creating it in Rhino.
put that command right before the sync in your loop, and see if that changes anything.
Radio Check
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location:
Posted: 31st Aug 2004 01:03
Yeah, no change.

I tried switching objects, switching the order in which they load, I moved the commands out of the function and put them straight in the loop, I changed the "point object" command to point to an arbitrary spot in space... nothing works.

I can "rotate object" just fine, but not "point object"

Making a cool sig is just too much pressure for me right now.
Zokomoko
22
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 31st Aug 2004 01:22
are you using DBPRO ?

post your code.
Radio Check
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location:
Posted: 31st Aug 2004 05:55
Quote: "are you using DBPRO ?"


Yes. DBP

Quote: "post your code. "


It's in my second post to this thread. Just in case I will post it again.

Of course, by now, what I have here is a little changed as I try to make it work.

I've been messing with this all afternoon and still can't find anything stupid I have done to make it not work, thanks for any help.

Making a cool sig is just too much pressure for me right now.
Zokomoko
22
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 31st Aug 2004 16:07
ok, couple of things:

first, don't use lights, only use set ambient light, otherwise your framerate will go down when you'll have more objects.
you could also use a lightmap to achieve the effect.

Quote: "rotate object 403, 10,90,0"

i don't think a space between the commas is allowed, it works for me without spaces : rotate object 403,10,90,0 (so remove the spaces just in case).

i assume you rotate the object so it will face the right direct (meaning the front of the object will face to the front).
when you point the object somwhere else, all the rotation you've done previously has no effect. so if you want the object to retain its rotation, either do it from a 3d modeler program, or use "fix object pivot objnum".

Quote: "point light 0, object position x(401), object position y(401), object position z(401)"


notice your light will always point at the object number 401.

Quote: "point object 403,0,100,123"


but here your gun object will always point at those coordinates, rather then a specific object.

when you say your cannon doesn't point at your ship, do you mean it doesn't always point at it, or it doesn't at all ?
Radio Check
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location:
Posted: 31st Aug 2004 22:15
Sorry, I shouldn't have posted the second piece of code... it contained a lot of things that are confusing. The additional rotates are just to see if "rotate" works at all. It did and those should have been removed.

I will try removing the spaces, but "point light" works well with spaces.

I'll try it now.

OK, now I have removed everything but the ship and the gun, I put everything in the loop instead of in functions, and I removed the spaces. And I fixed the joystick so that joystick z makes the ship move just in case someone tries it with a regular stick.

Still don't work! Arrgghh! Thanks for any help, this time I don't think it's me.

Making a cool sig is just too much pressure for me right now.
Radio Check
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location:
Posted: 1st Sep 2004 03:39
OK...

Now I have it down to just a few lines that still show the problem.


Making a cool sig is just too much pressure for me right now.

Login to post a reply

Server time is: 2024-11-27 08:46:31
Your offset time is: 2024-11-27 08:46:31