Moving camera betwen two vector

Posted By: LawnmowerMan

Moving camera betwen two vector - 07/27/14 09:09

How to make the camera moves between two vectors, first to start slowly and accelerate, and at the end to slow down? What function I should use?

Thanks
Posted By: WretchedSid

Re: Moving camera betwen two vector - 07/27/14 11:00

Math
Posted By: LawnmowerMan

Re: Moving camera betwen two vector - 07/27/14 12:58

You are now smart or what? What math can help me if I do not know what engine function to use? Did you read my question?
Quote:
What function I should use?

I am not a coder, and I am not smart like you, I just asked for help here in STARTING WITH GAMESTUDIO, and if you do not want to help, simply leave my post alone.
Posted By: WretchedSid

Re: Moving camera betwen two vector - 07/27/14 13:24

Originally Posted By: LawnmowerMan
You are now smart or what?

Not just now! I was also smart 5 minutes ago. At least, I like to pretend I'm smart, truth be told, if I remember how to add up two numbers correctly without using a calculator, it's been a successful day for me.

I hate "please google shit for me" requests though, because that is what you are asking. You are asking us to google for you how to interpolate between numbers, but you didn't even give any information about what kind of acceleration curve you want or anything. So I rolled a dice for you and picked one for you. Behold, math:

Code:
result = _startValue + (-_difference / 2.0 * (cos(pi * time / _duration) - 1.0));



It's pesudo code (actually it's C++ and taken out of Rayne, but it might as well be pseudocode for Lite-C). _startValue, result and _difference are VECTOR. _difference is the difference between start and end, time is the delta into the animation and _duration is the duration of the animation.
Posted By: LawnmowerMan

Re: Moving camera betwen two vector - 07/27/14 14:09

This has nothing to do with "please google shit for me" requests. I'll try to explain better.
We have two entities that are located in the level - entity START and entity END. I need some advice about how to make the camera moves between these entities something like
Code:
if(camera.y < entityEND.y)
{
	camera.y += 10 * time_step;
}


OK, this can work if camera.z and entityEND.z have the same height cordinates. If entityEND is above entitySTART (from where camera start) then I do not know how make this. I tried with vec_diff, but I do not know how move together camera.y and camera.z to hit entityEND. With path this is easy but i need solution without path.
Posted By: WretchedSid

Re: Moving camera betwen two vector - 07/27/14 14:11

I literally gave you code for that. Seriously, it's math. There is no magic Engine function. And it IS a "google for me, plox" request.
Posted By: DLively

Re: Moving camera betwen two vector - 07/27/14 14:24

Quote:
Not just now! I was also smart 5 minutes ago. At least, I like to pretend I'm smart, truth be told, if I remember how to add up two numbers correctly without using a calculator, it's been a successful day for me.

LMFAO!!!!!

Quote:
And it IS a "google for me, plox" request.


I agree with JustSid. If your looking for a request you're in the wrong section of this forum.

AND the im not a 'coder' doesnt fly. If you're looking to make a game, then you should work on your programming skills. Moving the camera from one point to the other is VERY simple.

Quote:

Code:
if(camera.y < entityEND.y)
{
	camera.y += 10 * time_step;
}




You're on the right track, but if you are looking for height differences, you'll need to use all 3 of the cameras vector points (x,y, AND Z) and some more math.
Posted By: Superku

Re: Moving camera betwen two vector - 07/27/14 14:33

Try vec_lerp with Sid's or some other formula for a smooth interpolation argument.
Posted By: LawnmowerMan

Re: Moving camera betwen two vector - 07/27/14 14:55

Thank God! Finally simple, short and useful answer.
This is a magic engine function what I looking for, thank you Superku a million times.
Posted By: WretchedSid

Re: Moving camera betwen two vector - 07/27/14 15:53

Cool. Ping us when you find out that it requires math for the acceleration you were looking for.
Posted By: DLively

Re: Moving camera betwen two vector - 07/27/14 16:51

Quote:
Finally simple, short and useful answer.


This all depends on how you want to interpret our 'useful help'. If you want someone to program it for you, then request it in the user requests.

and JustSid already gave you the answer btw...
Posted By: Emre

Re: Moving camera betwen two vector - 07/27/14 19:41

You guys are so rude.. and acting like a child. Seriously.. Clearly, LawnmowerMan is beginner and he need your help. All he need is formula&function. If you don't want to help that guy, just don't do it. No one is forcing you.
Posted By: 3run

Re: Moving camera betwen two vector - 07/27/14 20:25

Originally Posted By: Emre
If you don't want to help that guy, just don't do it. No one is forcing you.
Thats exactly what I was telling to that small prick (wretched Sid tongue ) in another thread. Just ignore those threads/contributions/posts that you don't like guys! No one forces you to suck someone's 'finger', unless you are up to it by yourselves (as you dumb asses usually are). Stop making this community rude and useless by your 'pathetic' posts.
Posted By: WretchedSid

Re: Moving camera betwen two vector - 07/27/14 20:26

Sorry, but after 4 years with Gamestudio, he is no beginner anymore.
And even if he were, what's that supposed to mean? "Oh, he is a beginner, he doesn't have to learn, let's just give him code to copy and paste".

Contrary to the popular opinion, I don't mind answering beginner questions. What I do have a problem with however is people who don't seem to be interest at all in learning, but who just want to get their code.

So, why the fuck do I have a problem with that and you can cry me a river over how rude I am?
1) They don't contribute back. They can't, because they don't understand the things they were fed.
2) Turns out, programming really is about identifying a problem and taking all your previous knowledge to come up with a new solution tailored towards the problem. That's why understanding is so important, and why just throwing code at people won't help anyone.

Of course, you need a basic fundamental understanding of things. Program flow, how expressions work, stuff like boolean algebra, bit arithmetic, helps to know what a float and an int is and what distinguishes them. Stuff like that. I'm more than happy to explain these things if the asker seems to be genuinely interested in learning.

Then, there is problems with solving a problem. This isn't fundamental anymore, this is "hey, I'm stuck, here is my problem". If someone asks for pointers into the right direction so they can do their own research and eventually come up with their own solution: No problem whatsoever, I'm more than happy to help. And also to elaborate on things and the whys.

So, tl:dr: I wish I had a Euro for every time someone cried because a beginner was treated rudely.

Edit: Damn 3run, what a sick burn. Looks like I have to and go cry myself to sleep tonight.
Posted By: Superku

Re: Moving camera betwen two vector - 07/27/14 20:31

Guys chill pls.
Posted By: 3run

Re: Moving camera betwen two vector - 07/27/14 20:33

Originally Posted By: JustSid
Edit: Damn 3run, what a sick burn. Looks like I have to and go cry myself to sleep tonight.
I hope you'll be all right.. you can live with that, you know? As we (community) do live with such member like you (narcissus) around wink
Originally Posted By: Superku
Guys chill pls.
You are right man. This will be my last message towards my lovely friend grin

Posted By: Kartoffel

Re: Moving camera betwen two vector - 07/27/14 20:45

...and that's what happens when you take every word Sid says too serious and start arguing with him.

@OP: So, did you manage to solve your problem or are you still having problems finding a solution?
Posted By: WretchedSid

Re: Moving camera betwen two vector - 07/27/14 20:54

Originally Posted By: 3run
You are right man. This will be my last message towards my lovely friend grin

Just ignore it if you just want to flame around and don't want to help. WretchedSid gave a perfectly working answer in his second response, and all you guys are doing is dragging this into off-topic and are rude.

No, but seriously, pinky promise to not respond anymore to what I'm writing? This social justice warrior yadda is getting old, and I don't see you helping anyone either.
Posted By: LawnmowerMan

Re: Moving camera betwen two vector - 07/27/14 22:04

Well, this is starting to be fun. OK, at least I have to say something for end smile

Mr. DLively. You agre with Mr. Sid. About what?? Did is ask for name of engine function request that I'm looking for someone to write complete code? What you guys talking about? You say that one word "vec_lerp" is that I ask for complete code?
And what you call "useful help". First answer from Mr. Sid is "math", yeah very useful. Second is formula for acceleration for which I had no idea where to use it. Like i say "Hey man, I am not smart like you". I use 3dgs as a hobby because I'm not a programmer and it seems to easiest engine for me. Your help I will not comment. You're here five years longer than me, and I'll bet you have no idea how to make this for what i ask.

Then I have concluded that Mr. Sid just circling around and getting wise. I really do not have time to read his endless texts and chat with him. He does not use 3DGS, but has its own engine, and it's why I can understand that he could not give me an answer regarding vec_lerp functions. Well, maybe he learned something today. But next time Mr. Sid, please let the first people who always helps and who know 3DGS as Superku, 3run or someone else to answer first, beacuse this is not Rayne forum. If you're bored go in Morbius' Virtual Answering Machine, or start making a some A8 game, why not.

I can not believe what happens when a someone normally and politely ask for help in the forum...
Posted By: Emre

Re: Moving camera betwen two vector - 07/27/14 22:41

@Sid; I know you are very good programmer and you are smart guy. But also you have a giant arrogance. You're being sarcastic all the time and sometimes you exceeds the limit. You have no right to treat people like that. You have to control yourself. That's what i'm talking about.
Posted By: DLively

Re: Moving camera betwen two vector - 07/27/14 23:31

Wow. This turned UGLY. Sorry to exasibate things everyone, but I'll just answer what was said in my direction, to defend my integrity.

Quote:
You agre with Mr. Sid. About what

You're asking the community to do your work for you.

Quote:
Did is ask for name of engine function request that I'm looking for someone to write complete code? What you guys talking about? You say that one word "vec_lerp" is that I ask for complete code?


You didn't ask for vec_lerp. You made a request. This is what you asked:

Quote:

How to make the camera moves between two vectors, first to start slowly and accelerate, and at the end to slow down? What function I should use?

Thanks


Thats a request in my books.

Now if you asked: "I have this code here that I've been playing around with, and have it to this extent, but I can't seem to get it to work because of this error..." that is asking for a bit of help.

All I said is if you want to request this, your in the wrong forum. But you posted here - Thus I will try to teach before I just give someone the answer so they don't know anything else than they did before.


Quote:

And what you call "useful help"


Quote:

Finally simple, short and useful answer.


Quote:
Your help I will not comment


I in no way said that asking for a request was wrong, or that it makes you less of an individual. I also didn't belittle you. Infact I was being encouraging.

Quote:

You're on the right track, but if you are looking for height differences, you'll need to use all 3 of the cameras vector points (x,y, AND Z) and some more math.


So because you were too lazy to look into this a bit further, My help is useless, or of no help to you? If your not willing to learn, why would I write a full blown working snippit for you? Thats like saying You want to be rich but dont want to work for it, or even know how you got rich.

Quote:

You're here five years longer than me, and I'll bet you have no idea how to make this for what i ask.


Now thats a fucktard of a thing to say, comming from the person that knows nothing of what they are asking. If your going to try and insult my intelligence you'd better choose your bets more wisely - Because I'll bet the next time you ask for help, I wont - And I'll win both bets.

Quote:
I use 3dgs as a hobby because I'm not a programmer and it seems to easiest engine for me.

Now thats a piss in the wind. If you want to make games. LEARN TO PROGRAM. Infact learn all aspects of GAME CREATION. That is if thats what you want to do with your hobby. Or is your hobby to have others make games for you, so you can take the credit? I'm just a hobbiest myself. That doesn't mean im going to call myself and idiot and say I can't learn how to program so i need someone else to do it for me.

So before you go and insult someone that was trying to help you learn, think about what your intentions are - before you judge someone elses.

Quote:
or start making a some A8 game, why not.

I've completed my first full game some months ago, but due to some minor set backs I can't release it yet.

I've concluded You're really quick to make ASSumptions, and no longer worth my time.

Quote:
You guys are so rude.. and acting like a child. Seriously.. Clearly, LawnmowerMan is beginner and he need your help. All he need is formula&function. If you don't want to help that guy, just don't do it. No one is forcing you.


I have no beef with you Emre, I like you. But I would like to say I suppose teachers acting childish when they mark homework then? No. The more effort you put in, the better the results you get.

Quote:

and all you guys are doing is dragging this into off-topic and are rude.


and once again, I am agreeing with WretchedSid.

Peace.
Posted By: Kartoffel

Re: Moving camera betwen two vector - 07/28/14 08:37

God, just stop all this bullshit, it's getting ludicrous.

Here's the damn code (I dind't test it), make sure you understand it.
Code:
float p = ...; // blending percentage, range [0...1]


p = 0.5 - cos(p * 3.141592) / 2.0; // apply smooth falloff
vec_lerp(vPos_Output, vPos_Start, vPos_End, p);

Posted By: LawnmowerMan

Re: Moving camera betwen two vector - 07/28/14 08:49

Quote:
you'll need to use all 3 of the cameras vector points (x,y, AND Z) and some more math

Man thank you, I did not know that there is a vector x, this really help me. Programming has something with math? Man thanks again.

And WTF if I ask for help? Hey, do you hear yourself?!

To be honest and real, first a gigant arrogance in first answer from Mr. Sid, then you and Sid attacked me without any reason that I am parasite that requires from you to write code for me. And this is all truth, only you and Sid can not see this. That's not a way how you and Sid can talk with me or anyone else. I just ask HOW and this is reason why this forum exist. Who you are guys to judge about anything here? Superku simply give me answer and what is the problem? He has knowledge, he spent a few seconds to answer, and milion thanks for all what he do for this community.

@Kartoffel
Quote:
God, just stop all this bullshit, it's getting ludicrous

Man you're totally right. I'm going to stop here and apologize to everyone.
Posted By: Kartoffel

Re: Moving camera betwen two vector - 07/28/14 09:04

Originally Posted By: LawnmowerMan
@Kartoffel
Quote:
God, just stop all this bullshit, it's getting ludicrous

Man you're totally right. I'm going to stop here and apologize to everyone.

I actually didn't say this to you but to everybody (in case you think that).
If you still have questions please ask.
Posted By: LawnmowerMan

Re: Moving camera betwen two vector - 07/28/14 10:00

Yes sure Kartoffel, I know you mean on all of us wink. And thank you for the code.
Yesterday, I had already made the camera moves in a given plane. To be honest I do not quite understand this formula, but I have an idea to make my own formula that will only slowly reduce the speed when camera is close to the target (if(vec_dist(camera.x,entityEND.x)<50) then camera_speed - slowdown formula). To make this formula I will try use vec_diff.
If that does not work I'll be back with new questions about formula for camera slowdown, but first I'll try to do it alone.
Posted By: WretchedSid

Re: Moving camera betwen two vector - 07/28/14 10:11

Weeeeee...

I love how I haven't personally attacked anyone but it seems to be all cool for you guys to do that. Don't want to imagine the shit storm if I did that.

Originally Posted By: LawnmowerMan
That's not a way how you and Sid can talk with me or anyone else. I just ask HOW and this is reason why this forum exist.

I told you how. The answer is math, plain and simple. "OH MERR GOD; YOU ARE SO TROLLING"... Sod off, the answer is math and no amount of sugar coating is going to change that. I even gave you a working algorithm that does exactly 100% what you want. But yeah, I'm so so mean and such a troll and so sarcastic and arrogant.

All you guys did so far was cry about how mean I am and how terrible of a person I am and how others with real answers should answer (let's ignore that that would exclude you from answering), totally ignoring the fact that I gave the correct answer including a working example two posts in. Hooray and go fuck yourself, Mr. Sid, am I right?

I'm sorry that somehow it's expected to spoon feed people and if that's not happen you are suddenly a bad guy. The quality of this forum will become oh so much better if we encourage people to not think for themselves anymore. Like, what the shit guys?! I'll give you that I made a snarky reply, not that it was factually wrong, but it was snarky. Sponsored by the attitude of Mr. LawnmowerMan and everything. I made my point why I answered this way and why I refuse to spoon feed people. If you guys get off of doing that, by all means, go ahead and answer. But seriously, whom is helped by you personally attacking me?

Again, vec_lerp() is partially an answer, but it's not the magic function he is looking for. He specifically asked for acceleration and deceleration, vec_lerp does linear interpolation. God I'm so evil for pointing that out, am I rite guyz?!

I got a good chuckle out of this thread, I'll give you that. The Mr. Sid part is funny, and thanks to 3run for the new nickname grin
But what I really love is this part:

Quote:
First answer from Mr. Sid is "math", yeah very useful. Second is formula for acceleration for which I had no idea where to use it. Like i say "Hey man, I am not smart like you". I use 3dgs as a hobby because I'm not a programmer and it seems to easiest engine for me. Your help I will not comment. You're here five years longer than me, and I'll bet you have no idea how to make this for what i ask.

Sorry, you are right. I have no idea to do what you asked for. My obviously wrong answer reflects that fact. I told you, I can barely add numbers togethers! Also, after punching in some numbers into a calculator, I arrived at the conclusion that I'm here three years longer than you, not five. I see why math was not the answer of your liking.

Go play in your bubble some more, it seems to be a fun place.
Posted By: LawnmowerMan

Re: Moving camera betwen two vector - 07/28/14 10:31

Wait, wait. First of all you and DLivley mixing things. I tell him this about 'he have no idea how to make this for what I ask', and I tell you 'if you bored start make some game with A8'. First part of my text is for him and second for you. You just write, you must read also.

I think You've now realized that your first answer was so arrogant. Math, yes, every moment of our life is mathematics, but I ask for engine function also, I did not search a stupid answer you give me, or you simply can not understand this?
Anyway, are you at all the 3DGS user, or you just trolling around here?
Posted By: Michael_Schwarz

Re: Moving camera betwen two vector - 07/28/14 11:15

Dear god, what is going on here. Look I agree that Sidney, the love of my life, is kind of rude sometimes; but you don't have to take it as a personal offense.

And quite besides that, he is absolutely right. Just asking for a solution won't get you ANYWHERE in game development or just development in general. You need to understand the underlying stuff, the way you come to a certain solution and the solution itself. It does you absolutely no good to just know the correct solution to THIS ONE PARTICULAR problem, it won't help you understand why it is the right solution. You need to understand the reasoning behind it as well, so that in the future you can apply that knowledge to problems that are similar.

The point you are making about the right engine function is completely irrelevant. I have been saying it since I started with 3DGS and I will keep saying it now: The Manual is your best friend.

Seriously, the 3DGS manual is one of the best manuals for game engines out there! Not only is it logically structured, easy to search and documents every function, their speed and more; No, it even explains how stuff works behind the scenes.

If you don't know that you need the "vec_lerp" function you'd do a full text search for "interpolation" and it would come up in the first results. Nobody needs to tell you that, this is a basic computer skill.

99.99% of all 3DGS problems can be solved by typing the main keyword about the problem into the manual search function and going through the top 10 results. Yes, I am sorry, you need to read and you need to possess reading comprehension skills.

This is not about being rude or not understanding newcomers, this is about applying basic, common knowledge, everyday skills to a problem!

You need to understand the underlying process of computer science problem solving, in the real world there is no such thing as "full code answer plox", YOU need to be the one to identify your problem, to understand what steps you need to take, apply a theoretical solution to your problem and if that didn't work, develop a new theory to solve the problem.

I understand that what we tell you here seems rude, because we don't just give you the complete answer, but in the long run you will need to learn how to solve this stuff on your own. What we can provide are pointers (Math!) and then come up with your own solution. If you are at the end of your rope, post the attempts that you made and explain why you came to such a conclusion and ask for a pointer in the direction of the right answer, you need to put in your own work in order for us to see that you are willing to work on a problem and to solve it on your own instead of relying on others to give you a solution on a golden platter.

Take your opening problem as an example, these are the steps that I would take to come to the same solution:

1. Identify your problem "I want to accellerate and decellerate camera movements between two points"
2. break down the complex problem into smaller bits:
- 1. Camera position = a Vector
- 2. Movement = a point between two vectors (start, end)
- 3. Accelleration/Decelleration = increasing and decreasing numbers

3. Find a solution to your main problem point (2.2) "How do I get a point between two vectors"
4. Alright great, now how do I get a point between two vectors at a specified distance?
- Keyword: Interpolation (You can get here by doing some basic google searches)
5. Now we know that you need to interpolate the camera position between your start and end point
- Look in manual for keyword "interpolation" or "interpolate"
6. Cool "vec_lerp"!
7. Now on to problem 2.3
- Accelleration and decelleration, keywords into manual
8. Find function
9. Now you have the basic building stones to propose a solution to your problem, so try it out.
10. Does it work? No? Go back a few steps and read through the way the answers you found work. Try again.
11. No luck even after repeatedly trying? Post a question here, and show us what approaches you have taken, let us see your thought process.

Then and only then can we help you get better. We can tell you where you went wrong and why, ask you why you would come to such a conclusion and give you an answer why that does and doesn't work and why something different would be better.

I am sorry that programming is not child's play, but there it is. There is a reason it's called "Computer Science" and not "Computer lego building".

Does this make sense to you?
Posted By: WretchedSid

Re: Moving camera betwen two vector - 07/28/14 11:16

Originally Posted By: LawnmowerMan
Wait, wait. First of all you and DLivley mixing things. I tell him this about 'he have no idea how to make this for what I ask', and I tell you 'if you bored start make some game with A8'. First part of my text is for him and second for you.

Ah, right, gotcha. Sorry, that wasn't clear.

Originally Posted By: LawnmowerMan
I think You've now realized that your first answer was so arrogant.

I said snarky, not arrogant. Really, there is a difference. I don't hate answering questions, I don't mind giving lengthy explanations. It all really depends on the effort you put into your question, and I don't mind to elaborate on answers when things aren't clear.

Originally Posted By: LawnmowerMan
Math, yes, every moment of our life is mathematic

Oh come on, this is pathetic now. Next thing you tell me that we are all going to die and what's the purpose of anything, really?

Originally Posted By: LawnmowerMan
but I ask for engine function also, I did not search a stupid answer you give me, or you simply can not understand this?

This right there is the problem. You get the right answer and instead of even attempting to follow it or asking a follow up question, all you say is "oh, nice, but I really want finished code so kindly go fuck yourself" (Paraphrased, obviously, before anyone wants to whine about it).

Originally Posted By: LawnmowerMan
Anyway, are you at all the 3DGS user, or you just trolling around here?

Pack it up boys, this is a 3dgs users exclusive forum now. In all seriousness, this forum is going to be really empty if the non 3dgs users were no longer here.
And it turns out that concepts in programming transfer between languages and frameworks. I know right, terrible thing to think about.
Posted By: Michael_Schwarz

Re: Moving camera betwen two vector - 07/28/14 11:40

Originally Posted By: LawnmowerMan
Yes sure Kartoffel, I know you mean on all of us wink. And thank you for the code.
Yesterday, I had already made the camera moves in a given plane. To be honest I do not quite understand this formula, but I have an idea to make my own formula that will only slowly reduce the speed when camera is close to the target (if(vec_dist(camera.x,entityEND.x)<50) then camera_speed - slowdown formula). To make this formula I will try use vec_diff.
If that does not work I'll be back with new questions about formula for camera slowdown, but first I'll try to do it alone.


To get back to helping you, since this is the first time you actually proposed a snippet of your own with some sort of explanation towards the reasoning behind it:

Don't user predetermined trigger points to de-/accellerate. As we keep telling you, the answer is math. Have you learned about sinus and cosinus? Alright maybe not, but you know what a sinus curve is, yes? (In case you do not, here is a visual helper: http://3.bp.blogspot.com/-SQ_Q9OZMM1E/T-K7S0u6McI/AAAAAAAAF00/6VhU0XLwWfA/s1600/sine-curve.png )

Now do you think that in order to get a curve as such, the mathematician goes "okay now I increased by 0.1 so I need to move this over 0.1" and then does that for every point? No, of course not, if he did that the curve would neither be smooth nor would he be able to accomplish it in his lifetime.

so "the answer is math", you only need one formula which will take care of all of this, you don't need certain points at which it will do the accelleration or decelleration, math with solve this problem mathemagically (harhar).

Let's have a look at what kartoffel showed you:

Originally Posted By: Kartoffel

Here's the damn code (I dind't test it), make sure you understand it.
Code:
float p = ...; // blending percentage, range [0...1]


p = 0.5 - cos(p * 3.141592) / 2.0; // apply smooth falloff
vec_lerp(vPos_Output, vPos_Start, vPos_End, p);



You have "p", which is a percentage (as the comment indicates), only that for computers "0-100" is a bit overkill, so we use 0.0 (0%) to 1.0 (100%), you can call this a factor if you wish to do so (and quite honestly I don't know the real name for this off the top of my head, but that is not important). To make it clearer: 5% would be 0.05 and 10% are 0.1. Easy so far, yes?

You have got two points, start and end (in Kartoffel's example "vPos_Start" (vector Position start) and "vPos_End" (go on take a guess what this stands for)) and you need a vector in which the new camera position is saved (vPos_Output).

In this example, p is the percentage of how "complete" the camera is through the path, at 0% the camera is at the starting position and at 100% it's at the end position, at 50% it's exactly between those two points.

Additionally you have this wonderful mathemagic line of "p = 0.5 - cos(p * 3.141592) / 2.0;" You can find these formulae online, you don't _really_ need to understand them, but it helps if you do. The gist is, that this will take care of accelleration and decelleration for you, no matter how long the distance between the two points is. You should read into it though, it will help you in the future, sin and cos are very important for "smoothing" stuff.

Now, I don't know how much of this you understand since you don't show any willingness to try something on your own and would rather wait for someone to spoon feed you the answer, or even how much you understand after I explained the general idea to you for the same reason as before. If you had done your research you could have come to a solution akin to

Code:
float p = ...; // blending percentage, range [0...1]
vec_lerp(vPos_Output, vPos_Start, vPos_End, p);



and you would understand HOW it works and why! But you would want it to be better, like what you wanted but your math sucks, so you could have posted that and asked if someone knows a simple formula that will help you accomplish this and we would have given it to you, because we have seen that you have tried yourself and that you have put work into it and that you have grasped that basics. that the only thing lacking was your understanding of higher mathematics, which is fine! Not everyone can be an Albert Einstein, but it would have shown initiative on your part, which is all we are asking for.
Posted By: LawnmowerMan

Re: Moving camera betwen two vector - 07/28/14 12:41

Hey guys I have no idea what you're talking about. For 4 years, I asked a few questions, I always in detail search answer in the forum or AUM, because they are mostly all the answers there. For this what I needed I could not find answer then I purposely asked here in STARTING WITH GAME STUDIO not in ASK DEVELOPERS and not in LITE-C PROGRAMMING, beacuse I am noob, and I was thinking than there is a some smarter beginner who can give me tips. I do not touch your highly intelligent world. Hey I just ask in the forum for beginners. Did I ask someone to write complete code? No! Superku told me for vec_lerp, I thanks him and I continued alone using manual.
As I said I am not a programmer, I am artist, and really I give my best to make a simple code for my mini games. I use 3DGS as a hobby, because there are thousands of free codes and open soruce games for him. Is it a sin?

Quote:
this forum is going to be really empty if the non 3dgs users were no longer here
No, this forum is going to be really empty if someone asks for help, and gets a response like your.

Simply put, if someone knows better programming than me, it does not give him the right to blemish me.

Anyway, Michael thank you a lot for explanation, I will read it again to understand how this code works.
Posted By: WretchedSid

Re: Moving camera betwen two vector - 07/28/14 13:03

Originally Posted By: LawnmowerMan
Quote:
this forum is going to be really empty if the non 3dgs users were no longer here
No, this forum is going to be really empty if someone asks for help, and gets a response like your.

And nothing of value would be lost.
I mean, come on, you have only asked questions and contributed nothing back to the forum or the users. Stop bitching about people who actually go out of their way and help others.

I'm sorry, but this is getting way too retarded even for me.
Posted By: Michael_Schwarz

Re: Moving camera betwen two vector - 07/28/14 13:04

Originally Posted By: LawnmowerMan
Hey guys I have no idea what you're talking about. For 4 years, I asked a few questions, I always in detail search answer in the forum or AUM, because they are mostly all the answers there. For this what I needed I could not find answer then I purposely asked here in STARTING WITH GAME STUDIO not in ASK DEVELOPERS and not in LITE-C PROGRAMMING


The point is, you didn't show us that you took the initiative, that you did research, etc. You just posted something akin to "code plox" and that was it. SHOW us that you did research, SHOW us what you reasoning was and why in the end you did not get to where you wanted to go.

Originally Posted By: LawnmowerMan
I do not touch your highly intelligent world.


Why keep making inflammatory comments if you hate them so much?

Originally Posted By: LawnmowerMan
Did I ask someone to write complete code? No!


It is heavily implied because you lacked any sort of evidence showing that you had put in effort.

Originally Posted By: LawnmowerMan
As I said I am not a programmer, I am artist, and really I give my best to make a simple code for my mini games. I use 3DGS as a hobby, because there are thousands of free codes and open soruce games for him. Is it a sin?


If you insist on being an artist, then get someone to program for you. If you don't want that then you need to learn, you can't have it both ways.

Of course it's not a sin to use it as a hobby or to use the thousands of free code snippets available, but again you need to put in some effort if you want to do the programming part on your own.

Originally Posted By: LawnmowerMan
No, this forum is going to be really empty if someone asks for help, and gets a response like your.


Again, your question was blatant and lacking any evidence to show work and effort on your part and heavily implied just asking for a working solution. This is frowned upon heavily, it has nothing to do with us, but with the way you asked.

Originally Posted By: LawnmowerMan
Simply put, if someone knows better programming than me, it does not give him the right to blemish me.


And we did nothing of the sort. Yes, maybe Sidney's heavily sarcastic tone may hurt your feelings if you take it personal, but that is not the point.

Anyway, I hope you get the point. If you ask for help, SHOW your work, SHOW your research, SHOW your reasoning, SHOW your theories, SHOW your thinking, EXPLAIN what it is you want, EXPLAIN why you didn't arrive at the solution.
Posted By: Emre

Re: Moving camera betwen two vector - 07/28/14 13:05

LawnmowerMan... just use "ignore this user" button and.. don't waste your time. wink
Posted By: Michael_Schwarz

Re: Moving camera betwen two vector - 07/28/14 13:15

Originally Posted By: Emre
LawnmowerMan... just use "ignore this user" button and.. don't waste your time. wink


If he did that, he'd waste even more time. I don't think you even get the point of the entire discussion.
Posted By: Slin

Re: Moving camera betwen two vector - 07/28/14 13:31

The point is that LawnmowerMan got several perfectly good answers starting with the formula posted by Sid (who is mine btw, so fuck off Michael) in the beginning and later by Kartoffel and then even an explanation by Michael and all they got for it was more flaming because LawnmowerMan didnīt even try to understand those answers. Probably because its math...
I could try to explain why Sids formula was already a perfect solution, but I guess I would still only be the asshole that decided to side with the ones having the wrong opinion. As a result I donīt even try to explain.

Seriously guys, Sid is right and didnīt even start all the flaming. If you donīt understand something just ask follow up questions, but at least show everyone that you tried.
Posted By: Michael_Schwarz

Re: Moving camera betwen two vector - 07/28/14 13:40

Originally Posted By: Slin
Sid (who is mine btw, so fuck off Michael)


I guess we'll have to settle this in an old-fashioned duel to the death.
Posted By: Slin

Re: Moving camera betwen two vector - 07/28/14 13:41

I got nerfguns!
Posted By: Michael_Schwarz

Re: Moving camera betwen two vector - 07/28/14 13:45

I have a pocket knife!
Posted By: LawnmowerMan

Re: Moving camera betwen two vector - 07/28/14 14:17

Holy shit! Did you guys drugs together, or Mr. Sid needs lawyers to prove he is not guilty? Then I ask for impartial trial.

Ok, let's move in courtroom
Posted By: Michael_Schwarz

Re: Moving camera betwen two vector - 07/28/14 14:19

Actually yes, we do drugs together.
Posted By: Redeemer

Re: Moving camera betwen two vector - 07/28/14 15:20

Originally Posted By: LawnmowerMan
Holy shit! Did you guys drugs together, or Mr. Sid needs lawyers to prove he is not guilty? Then I ask for impartial trial.

Ok, let's move in courtroom

Post of the year
© 2024 lite-C Forums