Made a basic beginner physics tutorials for Babylon.js

Hi all,
Thank for this great engine. I am a kind of learner who likes to learn by doing so i started working on babylon.js with ammo.js physics and made this set of tutorials for beginners. They are hosted on my github including both standalone and playground link. Of course suggestions and comments are welcomed.

12 Likes

This is a great initiative !!! thanks a lot

cc @PirateJC

1 Like

Thank you for sharing. Continue, it can be very useful.

1 Like

@mmmovania this is awesome! I love the spirit of learning and teaching at the same time! Wonderful work!!!

2 Likes

Thank you for sharing @mmmovania. I like how you gave just enough comments to help explain the key aspects of the code. :clap:

1 Like

Wow I am so happy for such a positive response. I am adding a few more tutorials soon including

  1. cloth using softbody [DONE]
  2. bridge using hinge joint [DONE]
  3. basic car [DONE]

Of course comments and suggestions are welcomed.

3 Likes

Ok some updates. i am now on to car physics but am kind of stuck on how to proceed. I found a few forum posts esp. this one where the vehicle is mostly setup using low level ammo.js functions and objects.

To begin with i took the babylon.js getting started village demo car model to add physics to it but that gives a warning message because the car chassis and wheels are linked to each other but ammo.js wants the objects to be unlinked.

I also found [this URL] (WebGL physics-based car using Babylon.js and Oimo.js) which shows how to do physics in babylon.js using oimo.js but it uses motor joint whcih is not provided in ammo.js.

Any ideas on what is the best and simplest approach for car physics that I should take for my tutorial?

1 Like

Ok guys I managed to convert the car from the village demo of the getting started series of Babylon.js into physics based car (see the snapshot below). I based my code on the PG on making Vehicle using ammo.js. Will post the tutorial shortly.

Just added brake and reverse lights :slight_smile:

A teaser video of car movement, braking, reverse and brake lights:

8 Likes

@JohnK will get a kick out of this!

Ok the vehicle demo is live now. i also added in left and right blinking indicators :slight_smile:

Babylon.js vehicle demo

PG: Babylon.js Playground (babylonjs.com)

2 Likes

Ok the next upcoming tutorial will be … you guessed it right a Tank :slight_smile:

I have got a clean tank model in. Now working on the physics of it.

5 Likes

Ok the basic tank demo tutorial is now ready. Here is the updated teaser video.

The demo is now live here:

Here is the PG: https://playground.babylonjs.com/#BA06DD#2

Of course comments and suggestions welcome.

8 Likes

I get a real sense of the mass of the tank as it rolls over the bumps. :+1:

1 Like