requirements for exit door
This commit is contained in:
@@ -1,24 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using Escape_Room_Engine.Engine.Scripts.Modules;
|
||||
using Unity.XR.CoreUtils;
|
||||
using UnityEngine;
|
||||
using Logger = Escape_Room_Engine.Engine.Scripts.Utilities.Logger;
|
||||
using LogType = Escape_Room_Engine.Engine.Scripts.Utilities.LogType;
|
||||
|
||||
namespace Escape_Room_Engine.Engine.Scripts.Requirements
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Requirements/Face Space Center")]
|
||||
public class FaceSpaceCenter : OrientationRequirement
|
||||
{
|
||||
public override IEnumerable<Orientation> OrientationCandidates(Module module, Space space)
|
||||
protected override IEnumerable<Orientation> GenerateCandidates(Module module, Space space)
|
||||
{
|
||||
var orientation = new HashSet<Orientation>(1);
|
||||
float width = space.rrDimensions.width;
|
||||
float length = space.rrDimensions.length;
|
||||
var xRel = module.SrPosition.x / (width - 1);
|
||||
var zRel = module.SrPosition.y / (length - 1);
|
||||
|
||||
Debug.Log($"{xRel}, {zRel}, {1 - xRel}");
|
||||
|
||||
if (zRel > xRel)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user