1
1

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 5 years have passed since last update.

Three.jsAdvent Calendar 2016

Day 23

Quaternion.slerp で回転

Last updated at Posted at 2016-12-23

Quaternion.slerp

第一引数に qb(目標とする姿勢)
第二引数に t(0 から1までの割合)
をとり、現在の姿勢からどの程度目標とする姿勢に近いかを割合として表現するメソッドです.

three.js Reference/Quaternion

二つデモを作ってみました

矢印オブジェクトの姿勢を開始座標から目標座標に向けるデモ (gist)

Quaternion.inverse メソッドを使って
コンテナとしているキューブ側の姿勢を、指定座標を始点として 矢印オブジェクト(vTarget) に向けさせるデモ (gist)

よいクリスマスを

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?