<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>unity</title>
<link>https://ameblo.jp/bunbungames/</link>
<atom:link href="https://rssblog.ameba.jp/bunbungames/rss20.xml" rel="self" type="application/rss+xml" />
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" />
<description>unityで行ったことをメモしています。一部他のサイトと同様のことを書いています。</description>
<language>ja</language>
<item>
<title>プライバシーポリシー</title>
<description>
<![CDATA[ <p>私が開発しているアプリでは個人情報は一切収集しておりません。</p>
]]>
</description>
<link>https://ameblo.jp/bunbungames/entry-12723753572.html</link>
<pubDate>Fri, 28 Jan 2022 16:27:06 +0900</pubDate>
</item>
<item>
<title>オブジェクトの加速度取得（速度、角速度も）</title>
<description>
<![CDATA[ <p>steamプラグインのVelocityEstimatorを使って、加速度取得をしてみました。</p><p>&nbsp;</p><p>インスペクター画面</p><p>Estimate On Awakeにチェックを入れておくか、VelocityEstimator.BeginEstimatingVelocity関数を呼べば計測が始まるようです。</p><p>&nbsp;</p><p>他の自分のスクリプトなどからアクセスするときは</p><p>using Valve.VR.InteractionSystem;</p><p>で名前空間を加えた上で、</p><p>VelocityEstimator VE&nbsp;= GetComponent&lt;VelocityEstimator&gt;();</p><p>などとして取得した後、</p><p>VE.GetVelocityEstimate()　で速度</p><p>VE.GetAccelerationEstimate()　で加速度</p><p>VE.GetAngularVelocityEstimate()　で角速度</p><p>をVector3で取得できます！</p><p>&nbsp;</p><p>Vector3.magnitudeを使うと、速度などをそれぞれの大きさ(float型)に変換できるので便利です。</p><p>&nbsp;</p><p>以下の画像は加速度を取得してログ出力したものです。</p><p><a href="https://stat.ameba.jp/user_images/20220127/15/bunbungames/71/82/p/o0595035915066903313.png"><img alt="" height="253" src="https://stat.ameba.jp/user_images/20220127/15/bunbungames/71/82/p/o0595035915066903313.png" width="420"></a></p>
]]>
</description>
<link>https://ameblo.jp/bunbungames/entry-12723571136.html</link>
<pubDate>Thu, 27 Jan 2022 15:43:35 +0900</pubDate>
</item>
</channel>
</rss>
