0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

複合形状の物体を物理演算の世界に持ち込む (CANNON.js + THREE.js)

Last updated at Posted at 2020-12-31

See the Pen freefall by using cannon.js by kob58im (@kob58im) on CodePen.

要点

複合形状(ここではコの字型)の物体の作成は、ただ単に bodyaddShape するだけで良いっぽい。(cannon.jsのdemodemo.addScene関数から推測した結論。)

CANNON.jsの世界の物体をTHREE.jsの世界の物体に変換する部分は、cannon.demoshape2mesh 関数から持ってきました。

参考サイト

  1. 三次元物理演算エンジン、Cannon.jsを使ってみた。 | KnockKnock
0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?