Final cleanup before alpha release
This commit is contained in:
@@ -9,22 +9,22 @@ namespace SplashEdit.RuntimeCode
|
||||
public float PlayerHeight;
|
||||
|
||||
[HideInInspector]
|
||||
public Vector3 camPoint;
|
||||
float maxDistance = 1000f;
|
||||
public Vector3 CamPoint;
|
||||
private readonly float maxDistance = 1000f;
|
||||
|
||||
public void FindNavmesh()
|
||||
{
|
||||
NavMeshHit hit;
|
||||
if (NavMesh.SamplePosition(transform.position, out hit, maxDistance, NavMesh.AllAreas))
|
||||
{
|
||||
camPoint = hit.position + new Vector3(0, PlayerHeight, 0);
|
||||
CamPoint = hit.position + new Vector3(0, PlayerHeight, 0);
|
||||
}
|
||||
}
|
||||
void OnDrawGizmos()
|
||||
{
|
||||
FindNavmesh();
|
||||
Gizmos.color = Color.red;
|
||||
Gizmos.DrawSphere(camPoint, 0.2f);
|
||||
Gizmos.DrawSphere(CamPoint, 0.2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,8 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AI;
|
||||
|
||||
namespace SplashEdit.RuntimeCode
|
||||
{
|
||||
@@ -54,7 +52,7 @@ namespace SplashEdit.RuntimeCode
|
||||
if (player != null)
|
||||
{
|
||||
player.FindNavmesh();
|
||||
_playerPos = player.camPoint;
|
||||
_playerPos = player.CamPoint;
|
||||
_playerHeight = player.PlayerHeight;
|
||||
_playerRot = player.transform.rotation;
|
||||
}
|
||||
@@ -412,15 +410,11 @@ namespace SplashEdit.RuntimeCode
|
||||
}
|
||||
|
||||
void OnDrawGizmos()
|
||||
|
||||
{
|
||||
|
||||
Gizmos.DrawIcon(transform.position, "Packages/net.psxsplash.splashedit/Icons/PSXSceneExporter.png", true);
|
||||
Vector3 sceneOrigin = new Vector3(0, 0, 0);
|
||||
Vector3 cubeSize = new Vector3(8.0f * GTEScaling, 8.0f * GTEScaling, 8.0f * GTEScaling);
|
||||
Gizmos.color = Color.red;
|
||||
Gizmos.DrawWireCube(sceneOrigin, cubeSize);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user