I've been studying C++ for quite a while now and I can assure you that I'm not even close to fully mastering it.
However, I decided to learn something about OpenGL and have followed a series of tutorials on how to use it.
I can draw shapes, map textures, map heights, apply light et cetera, yet I can not figure out how to work with 2D physics.
I've been searching all over Google for it, but all I get is one or two tutorials on 3D physics, which to me are not that relevant without a proper explanation.
I ought to admit that I have some issues with the utilisation of mathematical logic in my programming, but this might be due to the fact that I have never really had the need to utilise it and I have not yet seen any good examples on this specific subject.
I hope somebody can supply me with (a) tutorial(s) and/or examples.
Thanks in advance.
I've been searching all over Google for it, but all I get is one or two tutorials on 3D physics, which to me are not that relevant without a proper explanation.
The same things that apply to 3D apply to 2D as well. Physics are really are nothing more than rules you personally set. So the question I have to ask is, what is it that you want to do? There is no thing as "this is how you do physics in a program", it all depends on you.
Disch, if you don't mind (I don't know, while we already are at maths and stuff): I am trying to get the formula for the intersection of two lines (guess what, for a game engine). I did actually already find the formula on some other site, but when I try it myself I always get a slightly different one...
If I'd write out my steps in latex, would you mind looking into them and telling me where I go wrong? Knowing where my formulas come from is a big deal for me.
There is a plus in my denominator where there is a minus in the formula I found. Otherwise my formula is identical to the other one, so I really have no idea as to what I could have done wrong.
EDIT: Oh, never mind. The formulas are actually completely identical, it's just that his derivation was probably a little bit different, so he ended up with a different order for the polynomials, so he had -(B-A)(C-D) and i had (A-B)(C-D) instead lol