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 / DB Pro: Can't get camera to follow my jet (pitch/roll 3rd person View)

Author
Message
lickuidstylz
20
Years of Service
User Offline
Joined: 13th Aug 2004
Location: MD in USA
Posted: 4th Nov 2004 22:52
I've tried so many things, and my camera just won't act right. The jet pitches and rolls according to the mouse xy movements. I can rotate the jet fine, but I can't get the camera to move correctly behind it. It always does some random rotating or something. Just wondering if someone has some experience in the matter. I'm figuring that those built in mathmatics (pitch object/roll object) are resetting the object xyz vectors. I don't really know how they work(just that they work)
Does anyone have an in depth tut. on the matter?
Does anyone have a tut. on physics with equations and descriptions?
Can anyone provide some code that would make a camera pitch and roll with the jet while staying behind it like a good POV's supposed to?

I'll provide the code for my proggie later (I'm at work now)
thanks everyone for your help!
The Guy

The only limits we have are those we set.
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 5th Nov 2004 07:39
Man I had the SAME problem. But then I tried a formula which reproduced the Henderson-Blinkovitch limitation effect and it worked GREAT!

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
lickuidstylz
20
Years of Service
User Offline
Joined: 13th Aug 2004
Location: MD in USA
Posted: 5th Nov 2004 08:34
That's great, do you have any links or know of any way I can go about achieving that?

The only limits we have are those we set.
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 5th Nov 2004 21:26
Er, I admit I was pulling your leg a tad in my previous post. There is no such thing as the Henderson-Blinkovitch limitation effect.

Seriously, if you do a search on the code snippets forum you will find in there various snippets which allow cameras to follow objects.

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
lickuidstylz
20
Years of Service
User Offline
Joined: 13th Aug 2004
Location: MD in USA
Posted: 5th Nov 2004 22:05
Ok, here's the thing, Henderson-Blinkovitch limitation effect??? I should've been more depictive of my immediate skepticism when I wrote that reply. Obviously it wasn't sarcastic enough. . All in all, I gave you the benefit of the doubt. So I did a google search, it took exactly 8.3 seconds out of my life that I'd like you to repay me in cashiers check form. I'll be expecting in the mail shortly. Thank you very much.

Perhaps I've posted too much on the forum so far, but I do a LOT of searching and reading before I'm lead to having to ask a question so I suppose I'll go back to that from this point on.
Philip. Before you get your brazier wires knotted up, let me disclaim: I KIIIIID I KIIIIID, just joking, I know there's no 1 elaborate-sounding mathematical holy grail for that. I AM however looking for a real set of equations that don't have names....but they actually do something. But it was an amusing name, I think I'll use it on some unsuspecting friends of mine and try to sound intelligent....like you did....or tried........with me. Hey guy, just joking again. :0D
....[adult swim]

The only limits we have are those we set.
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 6th Nov 2004 01:41
I've had numerous similar problems with objects moving off at seemingly random angles - rotating objects in dbpro is a nightmare if you want to use the return values for further calculations. I've managed to work around all of my rotation problems in one way or another, so there's a vague possibility I may be able to help out if you show us the code and tell us exactly how you want the chase-cam to behave. (But don't get your hopes up too high!)


lickuidstylz
20
Years of Service
User Offline
Joined: 13th Aug 2004
Location: MD in USA
Posted: 6th Nov 2004 02:19
I'll have to remember to upload the code in a snippet this evening. But basically if you vision a camera bolted on the back end of a jet facing the same direction as the jet while it pitches and rolls no matter what kind of rotation, that camera stays fixed on the jets orientation...that's how I want it to behave. Maybe I should just buy ez rotate or something?? and probably nuclear glory while I'm at it...

I can do a 3rd person view where you have the character walk around, and while they turn, they only turn on the Y axis. that's easy. But when you are dealing with all 3 axes, it's pretty tough. I'm trying to work out a formula that'll work for what I've described, I doubt if I'll be able to pull it off though.

The only limits we have are those we set.
lickuidstylz
20
Years of Service
User Offline
Joined: 13th Aug 2004
Location: MD in USA
Posted: 6th Nov 2004 02:22
Thanks Ric for your attention in the matter. And just like all those who help me, I'll offer you the same: If you need something modeled, just ask me. I'm very experienced with that.

The only limits we have are those we set.
Dodo
20
Years of Service
User Offline
Joined: 8th Aug 2004
Location: eating lunch
Posted: 6th Nov 2004 02:23 Edited at: 6th Nov 2004 02:24
not sure if this has anything to do with your game at all, but i made this program while trying to understand what you wanted to do. i think its quite cool the way the camera moves, but i don't think that its what your trying to achieve



hehe

I never knew that DB's cylinders were hollow though.

Part of solving the problem is actually noticing that the problem is there in the first place

lickuidstylz
20
Years of Service
User Offline
Joined: 13th Aug 2004
Location: MD in USA
Posted: 6th Nov 2004 02:46
Ok, I'll try that as SOON as I get home. Gotta pick up strings for my guitar first (high E string popped on me, the rat bastard). But from reading your code, it seems that the object rolls, and the camera rolls with it. But what about the x axis rotation (pitching the plane)? Anyway, I'll upload the code soon as i get home, so you'll see what I'm talking about.

Thanks Dodo

The only limits we have are those we set.
Dodo
20
Years of Service
User Offline
Joined: 8th Aug 2004
Location: eating lunch
Posted: 6th Nov 2004 04:36
aha! I knew there was something wrong with it. lol!

anyways, here is code with pitching as well



except now the plane/spaceship looks more like a target thingy(sorry mind block, can't think of the word... ) hope this helps

Part of solving the problem is actually noticing that the problem is there in the first place

Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 6th Nov 2004 08:09
Ok. I feel so bad now about my original post that I've posted Spooky's external camera code in the attached code box.

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 6th Nov 2004 08:36
I guess the code above will probably solve your problem - but if the offer of help with 3D modelling still stands, perhaps you could check out this link? I haven't been very lucky with getting any help on this yet!

http://forum.thegamecreators.com/?m=forum_view&t=39979&b=9


lickuidstylz
20
Years of Service
User Offline
Joined: 13th Aug 2004
Location: MD in USA
Posted: 6th Nov 2004 11:47


Here's the code snippet as promised, please rename the "jet.x" to whatever you'd like. Other than that, it should work.

The only limits we have are those we set.
lickuidstylz
20
Years of Service
User Offline
Joined: 13th Aug 2004
Location: MD in USA
Posted: 6th Nov 2004 11:50
Dodo. Thank you but your camera effect is almost just as funky as mine, Philip. Thank you, not quite a "true" chase cam, but a very VERY worth while variation of the same effect. I suppose I could add physics to the camera but then may have problems when it comes to collision, etc....

The only limits we have are those we set.
Dodo
20
Years of Service
User Offline
Joined: 8th Aug 2004
Location: eating lunch
Posted: 7th Nov 2004 04:58
Quote: "Dodo. Thank you but your camera effect is almost just as funky as mine, Philip. Thank you, not quite a "true" chase cam, but a very VERY worth while variation of the same effect."


huh? whose is as funky as yours and whose is a variation of the same effect?

Part of solving the problem is actually noticing that the problem is there in the first place

lickuidstylz
20
Years of Service
User Offline
Joined: 13th Aug 2004
Location: MD in USA
Posted: 7th Nov 2004 06:02
Sorry.... I meant to say that Dodo, I couldn't quite tame the behavior of the cam. And Philip, rotates the camera and locks the jet to the camera instead of the opposite way around. But that works.

The only limits we have are those we set.
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 7th Nov 2004 13:19 Edited at: 8th Nov 2004 02:32
Spooky's code works, but gives a 'locked on a pole' feel rather than a 'chase-cam' feel.

I've made some alterations to his code to give a more natural feel.




Brock
19
Years of Service
User Offline
Joined: 10th Oct 2004
Location: USA,MI,Detroit,
Posted: 7th Nov 2004 13:57
need help on blasting bullect out of animated sprites i need the code for my game can any one help me

Chima-Duru
lickuidstylz
20
Years of Service
User Offline
Joined: 13th Aug 2004
Location: MD in USA
Posted: 8th Nov 2004 11:57
Ric! THANK GOODNESS FOR YOU ARE A GENIUS!! freaking genius! this is almost EXACTLY what I'm looking for, I'll study this to get the precise effect I'm looking for. It behaves beautifully!!! Philip You're a genius too, and so are you DODO!! Brock This post is pretty old, I suggest you try to post your own new one.

As always, You people are great!
Thanks eternally

The only limits we have are those we set.
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 9th Nov 2004 09:21
Genius ? - nah. 60% trial and error, 40% luck.


Login to post a reply

Server time is: 2024-09-23 04:27:54
Your offset time is: 2024-09-23 04:27:54