#10: Ammo.js
Bijgewerkt op: 16 dec 2019
As you can read in post #6: Matter.js I want to simulate my robot and then use Neuroevolution so he can learn to walk on his own. But because Matter.js is just a 2D engine I needed to upgrade to a 3D engine, aka Ammo.js. Now I thought this was going to go smooth but I was wrong. I have been struggling on Ammo.js for a few days now, first I did a tutorial; https://medium.com/@bluemagnificent/intro-to-javascript-3d-physics-using-ammo-js-and-three-js-dd48df81f591 to begin. Where I tried to understand the code they used and test it myself, after going a few times through this tutorial I started to look for more examples, information, ... But I did not find a lot, then I started just trying myself. After a while I noticed that my way of thinking was completely off, too complicated. So I started again with a fresh clean code, thinking I just needed to draw each shape of the robot, apply physics to them and then hang them together through joints. After a few hours this was still not going well, eventually I got them "together" on the x-position, y-position and z-position. But still not the right connection between them, I tried using Point2PointConstraints and Hinge constraints non of them giving me the results that I want. Finally I just used both, still not the result that I want.








Opmerkingen