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.

VCIのSubItemの水平垂直出し(Y軸のみ回転させXZに0セット)

1
Last updated at Posted at 2019-08-03

概要

VCIはオイラーに代入できない?ので、特定の軸だけ回転させたい時に悩みましたので共有します。

スクリプト

local item = vci.assets.GetSubItem("item")
local ang = item.GetRotation().eulerAngles
item.SetRotation(Quaternion.identity)
item.SetRotation(Quaternion.AngleAxis(ang.y, Vector3.up))

or

local item = vci.assets.GetSubItem("item")
local ang = item.GetRotation().eulerAngles
local rot = Quaternion.Euler(0, ang.y, 0)
item.SetRotation(rot)

所感

なんかもっと良い方法がある気がします。

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?