Hiya, I’m new to three.js and physics engines. I’ve been watching a few tutorials and challenged myself to make mini game with some pirate ships. The trouble I have is that everything I have seen tutorial wise is geared towards using cars. Can anyone point me towards any tutorials or resources that will enable me the opportunity to learn how to make a boat move or a helicopter fly, just another vehicle that’s not a car basically.
Also what physics engines to choose? I’ve heard that cannon.js is lighter than Ammo. I presume that’s because Ammo has more to it? I’ve been struggling to find resources online so any pointers in the right direction would be a massive help!
AFAICS, Cannon.js is not maintained anymore. The official physics example on threejs.org
all use ammo.js.
https://threejs.org/examples/?q=ammo
Is there any js version docs/apis/tuts of ammo.js?
Before, I’ve tried and found it’s too hard to read C version docs, and also too hard to learn ammo.js directly from three.js examples.
This is the trouble I have found. I’ve found some basic tutorials on applying real basic physics. But when it comes to anything beyond a car driving around I couldn’t find anything to get a base understanding from. So I have no idea how to make a boat move or a plane fly.
EDIT
I have found this that might be a good start, something that was shared in another thread.
1 Like
Keep in mind that you don’t necessarily need a physic engine for your requirement. Implementing basic physic formulas based on force, mass, acceleration and velocity can already produce very natural looking results.
I suggest you are studying steering behaviors and the vehicle locomotion model which are a very popular techniques from game development. There is a lot of existing literature about that topic e.g. Programming game AI by example. Another interesting (but slightly advanced) learning resource are both Mechanics chapters from 3D Math Primer for Graphics and Game Development.
2 Likes
Thanks that’s an excellent place to start, thank you, And yes, I appreciate that a solution to this may not be in just including a physics engine. I have previously made some collision detections without a physics engine. I just think the amount I have planned in my head will require a lot more than what I could manage without the help of a physics library.