Тёмный

20b How to detect collision between pair of objects three.js & ammo.js 

flanniganable
Подписаться 1,4 тыс.
Просмотров 3,4 тыс.
50% 1

Learn how to do the contact pair test in ammo.js for three.js objects to detect collisions of 2 specific objects.
Timestamps:
00:00 Intro/demo
00:42 Get ammo.js file and tween.js CDN
01:07 Basics of contact pair test in three.js and ammo.js
03:29 Declare variables
04:12 Ammo.js start function
04:32 Initialize physics - collision configuration and gravity
04:45 Initialize graphics - scene setup in three.js
04:57 CreateCube function to create all cube objects: mesh & rigid bodies
06:14 Create ground cube
06:26 Create target cubes
06:45 Event handlers
06:53 Shoot ball when mouse down
08:16 Contact pair result callback function
09:31 Render loop
10:41 Update physics world (update transformation to moving objects)
11:06 Contact pair test #1 - console log results to show what is happening
14:12 Contact pair test #2
14:43 Contact pair test #3
Resources:
Ammo.js @ Github:
github.com/kripken/ammo.js/
Tween.umd.js CDN @ Cloudflare:
cdnjs.com/libraries/tween.js/...
Three.js physics examples:
threejs.org/examples/?q=physics
Game Physics: AmmoJS ref
perso.liris.cnrs.fr/nicolas.p...
Bullet Physics Manual
www.cs.kent.edu/~ruttan/GameEn...
Bullet Files Description
pybullet.org/Bullet/BulletFul...
Intro to JS 3d Physics AmmoJS and ThreeJS
/ intro-to-javascript-3d...

Опубликовано:

 

31 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии    
Далее
БИМ БАМ БУМ💥
00:14
Просмотров 1,7 млн
Best exercises to lose weight ! 😱
00:19
Просмотров 9 млн
18a How to detect collisions three.js
10:15
Просмотров 16 тыс.
20a Shoot ball at blocks three.js and ammo.js
18:43
Просмотров 1,7 тыс.
three.js & rapier3D - Character Terrain Movement
7:17
Water powered timers hidden in public restrooms
13:12
Просмотров 216 тыс.
RAG from the Ground Up with Python and Ollama
15:32
Просмотров 27 тыс.
JavaScript Promises In 10 Minutes
11:31
Просмотров 1,7 млн