Just got my RK4 integrator working and it´s capable of dealing with mass and I can attach springs to object and it just… Works! It´s a beautiful thing to see my “spaceship”, a triangle, skidding around the screen and a rendered force vector showing how force is applied to the object. It´s a great day for this newbie and I just had to tell the world.
Show us a video already!
I´ll do that right after I get around to do the “tractor beam”. Should be any day now…
Wow! I never saw this coming… Right after a posted this thread I felt something wasn´t right. I had “force” but not “momentum”, which set me out on a Don Quijote hunt for the missing vector “momentum”. I begun changing my code, bit by bit, until everything was totally unrecognizable. Nothing worked and felt like I had no idea what I was doing…
Now, 4 days of banging my head against the wall later I have gained some understanding. And I´ve realized I got it right the first time. So now I´ve come full circle with basically the same code I had 4 days ago and a lot more understandning of what is going on. Knowledge can be a harsh mistress…
Ahah ! The joy of coding ;D
Everybody knows those awesome moments when everything works fine and the bads one that gives you a headache.