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

ヘッドマウントディスプレイの情報

OVRManager om = GameObject.Find(“OVRCameraRig”).GetComponent<OVRManager>(); om.headPoseRelativeOf …

no image

Blenderで円柱のテクスチャがおかしい

円柱にテクスチャを貼ったらなんかポリゴン感があっておかしい。 スマートUV展開をするとちゃんと貼れましたー。

no image

RayでTrrigerを除外する

Project SettingsでPhysicsのQueries Hit Triggersのチェックを外す

no image

OculusQuestについて

VRについて、私が興味を持ったのは1990年代。 ちょっと調べてみると世にも奇妙な物語で「バーチャル・リアリティ」というストーリーが放送されたのが1991年となっているので、かなり前から言葉としてはあ …

no image

CLASSMATE -あの日- リリース

ついにこの日を迎えました。実験的なものとして作成しましたが、ゲーム性が全くなかったので抽選式でゲーム性を持たせました。これはおそらく未来の遊技機になる可能性がある第一歩と言えます。(大袈裟)さて、実験 …