10
3

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.

Unity2020からTransformの回転値インスペクタでクォータニオンのコピーが出来るようになっていた

Posted at

Unity2020からはインスペクタ上でクォータニオンの値をコピーできるようになった、という地味な新機能紹介です。

CopyQuaternion.gif
Rotation文字部分で右クリックするとコンテキストメニューが表示されるようになりました。
オイラー角(50, 30, -10)をCopy Quaternionすると、以下のコードがペーストされます。

// クォータニオンのペースト
Quaternion(0.386220366,0.269255698,-0.185263887,0.862561643)

とても便利です。
上記の動画でも分かる通りオイラー角もVector3型でコピーできるようになりました。以下のようにペーストされます。

// オイラー角のペースト
Vector3(50.0000038,30.0000038,350)

同様にPosition、ScaleもVector3型でコピーできるようになっています。


今回紹介したTipsはUnityの安原さんの動画でさらっと紹介されています。
納涼クォータニオン夏祭り - Unityステーション

10
3
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
10
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?