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 / Camera Problems

Author
Message
n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 6th Feb 2008 01:50
Hello!

Can someone help me out with my camera? I have gotten it to follow the object roughly, and have tried a few ways of getting it to stay behind the object, but I have a problem with the angles!

Here's my code:



I tried to use the curvevalue and sine and whatnot, but that basically did the same thing and I could not figure out how to orient the camera to the object correctly!

"I have faith, that I shall win the race, even though I have no legs, and am tied to a tree." ~Mark75
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 6th Feb 2008 03:23
Some code might help. That 1 line looks ok to me but without knowing how your using it it'd be hard to answer your question correctly.

3700+ Athlon 64 - Geforce 7600 GS - 2GbDDR2 RAM - 40Gb Hdd (In this pc) - Windows Vista Ultimate (x86)
n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 6th Feb 2008 03:41
That's all I am using. Other than that the cube just move forward/backwards and rotates left/right.

I can't get the camera to stay behind the object by using the Y angle, because it loops around and makes the camera stay on one side of the object. I was asking how I could get it to stay directly behind the object.

"I have faith, that I shall win the race, even though I have no legs, and am tied to a tree." ~Mark75
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 6th Feb 2008 03:50 Edited at: 6th Feb 2008 03:51
OK, give us a fighting chance to help you.

Post a runnable snippet of code which goes wrong - it should only need 10-20 lines copied and pasted from your main program. We don't need the whole lot - just enough to see it going wrong.

We can then take a look at it and hopefully point out how to fix it.

TDK_Man

n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 6th Feb 2008 20:25
Well that's not what I mean.

I know what the problem is, I just know how I am supposed to do something.

But here's the runnable part:



"I have faith, that I shall win the race, even though I have no legs, and am tied to a tree." ~Mark75
acelepage
20
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 6th Feb 2008 22:49
Your commands:
move camera right 1
move camera left 1
do not compute.
Are these commands part of a plug-in or expansion pack?

( 2b || !2b ), that is the question. The answer: true
Attila
FPSC Reloaded TGC Backer
20
Years of Service
User Offline
Joined: 17th Aug 2004
Location:
Posted: 6th Feb 2008 22:57
Try this

n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 6th Feb 2008 23:42
I'll try that, thanks.

But can you explain to me how it works? (Code boxes that don't have syntax highlighting throw me of easily.)

"I have faith, that I shall win the race, even though I have no legs, and am tied to a tree." ~Mark75
Attila
FPSC Reloaded TGC Backer
20
Years of Service
User Offline
Joined: 17th Aug 2004
Location:
Posted: 7th Feb 2008 00:37 Edited at: 7th Feb 2008 00:47
I put some comments into the program, this should help you to understand the code. When you start DB and paste the code into the editor you will get syntax highlighting.

(Lines starting with "`" are comments, lines between "remstart" and "remend" are comments)

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 7th Feb 2008 00:41
Quote: "Your commands:
move camera right 1
move camera left 1
do not compute."


Agreed - and with those extra spaces, it would probably fall over at the Set Camera To Follow line too!

For goodness sake n008, don't you know what a 'runnable' piece of code is? You know - one that is supposed to run!

Did you even run the snippet you posted above?

Quote: "I know what the problem is, I just know how I am supposed to do something."


Sorry, but are we supposed to be able to understand that?

If you know what the problem is, what are you asking?

Is it that you simply don't know how Set Camera To Follow works?

If so...



Instead of struggling like this and making silly errors that most newcomers don't make after their first week of using DB, why don't you read some tutorials?

TDK_Man

n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 7th Feb 2008 21:40 Edited at: 7th Feb 2008 21:54
Quote: "Did you even run the snippet you posted above?"


Um, yes it is a part of a program I was writing...

I just didn't get how to keep the camera in one place...

Thanks for absolutely nothing.

And the snippet itself is runnable... I don't know where those commands were from, but they work.

EDIT: I fixed the problem on my own, this thread can be locked.

"I have faith, that I shall win the race, even though I have no legs, and am tied to a tree." ~Mark75
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 7th Feb 2008 22:41
Quote: "Thanks for absolutely nothing"


That's exactly what you are going to get from me in the future when it comes to help - nothing. I hope the others who also tried to help you in this thread do the same.

I even took the time to fix your code for you and posted it above.

Not only are you very ignorant, you don't want to learn anything and are not worth wasting time on. You only appear to want others to do everything for you.

Quote: "And the snippet itself is runnable... I don't know where those commands were from, but they work."


Oh really? In what version of DB does the command move camera left 1 work?

Can anyone else run this supposedly 'working' code snippet of his?



I certainly can't!

Quote: "I fixed the problem on my own, this thread can be locked"


Nothing to do with the working code snippet I posted then eh?

If you were able to fix it yourself without any help from any of us here, why didn't you do that in the first place instead of wasting all of our time?


Apologies for the rant everyone, but after all of our efforts trying to help this waster, all he can say is "Thanks for absolutely nothing".

And I'm not locking this thread so everyone else who is as disgruntled as me can voice their opinions...

TDK_Man

n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 7th Feb 2008 22:56
Quote: "Nothing to do with the working code snippet I posted then eh?"


no, because if you were paying attention, I had a problem with ANGLES.

Of which I fixed by adding an incrumented variable to work the camera with -- It works fine.

And move camera left is a plugin command.

I forgot to remove those lines because I was actually attempting to solve the problem, gee go figure, in the IDE. Then I just pasted in the portions of code since you wanted the "whole code".

And what do you mean I just want everyone to do things for me?

I was justing asking a question!

Isn't that what this forum is for?

"I have faith, that I shall win the race, even though I have no legs, and am tied to a tree." ~Mark75

Login to post a reply

Server time is: 2024-09-27 10:24:48
Your offset time is: 2024-09-27 10:24:48