OculusQuest技術

OculusQuestでゲームを作る話

未分類

近づき

投稿日:

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

public class NavUniControl : MonoBehaviour
{
public Transform goal;
private NavMeshAgent agent;
private Animator animator;
// Start is called before the first frame update
void Start()
{
agent = GetComponent();
agent.destination = goal.position;

    animator = GetComponent<Animator>();
}

// Update is called once per frame
void Update()
{
    agent.destination = goal.position;

    if (agent.remainingDistance < agent.stoppingDistance)
    {
        animator.SetBool("walk", false);
        agent.isStopped = true;
    }
    else if (agent.remainingDistance > agent.stoppingDistance + 0.5f)
    {
        animator.SetBool("walk", true);
        agent.isStopped = false;
    }
}

}

-未分類

執筆者:


comment

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

関連記事

no image

ヘッドセットの中心をポインターにしたいだけなのです

視線の中心に丸を付けたり、その丸がオブジェクトに当たればイベントを発生させたい。前にCardboardで遊んでいたときは簡単にできたので今回も余裕っしょ!って思ってたら・・・簡単じゃなかった。結果的に …

no image

YouTubeVR

QuestでYouTubeを見てみた。まずはVRで「攻殻機動隊」の予告?があったので見てみたが、カメラワークの関係かすぐに酔いの症状に。これは使えない・・・次に普通の動画を見てみることに。なんと・・・ …

no image

同級生VR2β版テスト中

同級生VRの第二弾を作成しています。まだ何という機能もないのですが、6DoFを活かしたゲームを作成している作品です。なかなかテストも大変で、何が一番大変かというと寝転がるところだったりして、それに対し …

no image

Quest開発者はどうなる?

「Oculus Connect6」によって、Questが大幅に変わるような記事を見ました。「Oculus Link」 PC用ゲームができる。「 ハンドトラッキング 」手のモーションをトラッキングできる …

no image

ようやく作成できそう

同級生VRの次回作についてようやく作り出せるようになりました。まずはヒロインのモデル作りから始めていて、ようやく終わったところ。今回もVRoidにて作成。髪の毛が一番ポリゴンが多くて、とにかくローポリ …