OculusQuest技術

OculusQuestでゲームを作る話

未分類

目線

投稿日:2019年6月11日 更新日:




アニメーションにIKを付けて

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Mesen : MonoBehaviour
{
Animator animator;
Vector3 LookPos;

// Start is called before the first frame update
void Start()
{
    //Animatorコンポーネントを取得
    this.animator = GetComponent<Animator>();
    //Mainカメラの方向を見るようにする準備
    this.LookPos = Camera.main.transform.position;
}

// Update is called once per frame
void Update()
{
    this.LookPos = Camera.main.transform.position;
}

private void OnAnimatorIK(int layerIndex)
{
    //どの部位がどのくらい見るかを決める
    this.animator.SetLookAtWeight(1.0f, 0.0f, 1.0f, 0.0f, 0f);
    //どこを見るか(今回はカメラの位置)
    this.animator.SetLookAtPosition(this.LookPos);
}

}

-未分類

執筆者:


comment

メールアドレスが公開されることはありません。

関連記事

no image

トゥーン調のテスト

とりあえず、テストキャラを作ってみました。まあ、こんな感じでいいんじゃない?って具合にできました。テストなので実は左右の目の感じが違っていたりします。 何度も見てると妙な愛着が湧いたりするから、このま …

no image

UnityでOculus Quest用ソフト開発するには

Unityを起動します。 私の場合は2019.1.4f1を使用しています。 File→Build Setting画面でAndrodにしてSwitchPlatform playerSettingsで G …

no image

公共的なものはこれか?

「VRどじょうすくい」というものを見つけた。・・・島根県の伝統芸能なのか。これは一つの答えだと思う。ただ、これを現地でのイベントで使うんじゃなくて、一般に公開して練習させて島根県で大会を開いて・・・ま …

no image

CLASS -あの日- ネタバレ

宣伝動画http://hondasoft.com/download/classmate.mp4 では早速ネタバレです。このゲームは確率で進んでいくためある程度「運」が必要です。抽選が最大5回され、それ …

no image

近づき

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.AI; …