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 / Im probably missing something obvious

Author
Message
Darkflame
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location:
Posted: 21st Jan 2004 05:17
Im trying to get the camera follow command to operate smoothly:



However, when moving forward in any direction other then the initial one I get the whole screen jurking left and right rappidly.
Any ideas?

"The man who says it cannot be done is generally interrupted by someone doing it." ~ Elbert Hubbard
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 21st Jan 2004 07:22
don't ask me why. it's a long story, but look into the command CURVEANGLE()

-RUST-
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 21st Jan 2004 14:20
You could always up the smoothing a bit, currently you have no smoothing.


"Computers are useless they can only give you answers."
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 21st Jan 2004 17:07
You need to use 'float' variables when dealing with object positions and angles otherwise they are rounded to whole numbers.

Also, you have to very careful mixing the two types of DB rotation. So you need to rotate camera using code below.



Boo!
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 21st Jan 2004 17:14
Angle a# is the angle of your camera relative to the model, not the angle of your model. You only change the camera angle when you want to orbit or rotate around the center point (object 2.)

And, you should add POINT CAMERA x#,y#,z# after the SET CAMERA TO FOLLOW command so your camera will stay locked on to object 2.
--
TAZ

Darkflame
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location:
Posted: 21st Jan 2004 20:39
Surely changing the camera angle a *is* locking the camera onto the object?
Seems to work anyway....
---
spooky ~ yes, thats it, a combination of not wrapping the values and not using floats.
~sigh~
This is embarising because I made the exact same mistake awhile ago :p

"The man who says it cannot be done is generally interrupted by someone doing it." ~ Elbert Hubbard
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 21st Jan 2004 21:25
Quote: "Surely changing the camera angle a *is* locking the camera onto the object? Seems to work anyway...."


It depends on your camera height setting.

As a test, I used SET CAMERA TO FOLLOW and I created a 3rd person zoom feature that changed the cameraDistance parameter. When I zoomed in, the camera did not stay locked on the target and I 'overlooked' the model. In this example, cameraHeight was set around 20, I'm sure that if you set the height to zero you would not notice the problem. While SET CAMERA TO FOLLOW may turn the camera, POINT CAMERA was required to properly pitch the camera and keep it locked on. I also have code that set the camera height very high to create a switchable overhead view. Without POINT CAMERA, you end up looking out into space above the target, but not at that target.

Clear as mud?
--
TAZ

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 21st Jan 2004 22:27
Zircher, i keep meaning to tell you that I crack up every time I see your GameBeavers.Org logo sig. LOL

-RUST-
Darkflame
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location:
Posted: 22nd Jan 2004 09:17
Yes, I see the probablem with the pitch now.
Odd really, if you are tracking a certain set of co-ordinates, and supplying the hieght and distance, i would have thought it did the pitch itself
Anyway, dosnt mater, i dont need it, and its only an extra line if i do.
----
Question2:

How do you make the camera avoid objects?

I notice the flag at the end of the SET CAMERA TO FOLLOW is supposed to turn this on....but it dosnt seem to work.

I created a static box like:

MAKE STATIC COLLISION BOX 3.2, 7, 6.2,-1, 0, -6

But the camera just goes straight though it....any ideas?
(I put objects at the SCB's corners, so im sure its in the right place)

"The man who says it cannot be done is generally interrupted by someone doing it." ~ Elbert Hubbard
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 22nd Jan 2004 17:59
No help there, DBP's native collision system left me grinding my teeth. I took the lazy way out and bought Nuclear Glory's Collision DLL.
--
TAZ

Darkflame
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location:
Posted: 22nd Jan 2004 21:54 Edited at: 22nd Jan 2004 21:59
well, im not buying something that should work anyway, no mater how good it is

~sigh~
I can get object collisions to work (mostly), and i can get the camera collision to work too....but not on the follow command.

"The man who says it cannot be done is generally interrupted by someone doing it." ~ Elbert Hubbard
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 22nd Jan 2004 22:42
I'm sure it works, otherwise it would be in the bug list. I just took the easy way out. It's all a matter of what you want to spend your time doing. The release of the NDC DLL during the Alienware contest was perfect timing since it solved problems for me and allow me to move on.
--
TAZ

Login to post a reply

Server time is: 2024-09-21 18:25:56
Your offset time is: 2024-09-21 18:25:56