Commit 6f9eafd4 authored by Егор Парфенов's avatar Егор Парфенов
Browse files

Transitions finished

parent e13aab6a
Showing with 62 additions and 17 deletions
+62 -17
{"sJ":"{\"sId\":1,\"sC\":[{\"sId\":2,\"sC\":[],\"sP\":{\"x\":-20,\"y\":130,\"z\":80},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":3,\"sC\":[{\"sId\":4,\"sC\":[],\"sP\":{\"x\":-130,\"y\":100,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":5,\"sC\":[],\"sP\":{\"x\":-120,\"y\":100,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":6,\"sC\":[],\"sP\":{\"x\":-80,\"y\":100,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":7,\"sC\":[],\"sP\":{\"x\":-70,\"y\":100,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":8,\"sC\":[],\"sP\":{\"x\":-100,\"y\":110,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":9,\"sC\":[],\"sP\":{\"x\":-90,\"y\":120,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":10,\"sC\":[],\"sP\":{\"x\":-110,\"y\":120,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":11,\"sC\":[],\"sP\":{\"x\":-90,\"y\":100,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":12,\"sC\":[],\"sP\":{\"x\":-100,\"y\":100,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":13,\"sC\":[],\"sP\":{\"x\":-110,\"y\":100,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]}],\"sP\":{\"x\":0,\"y\":0,\"z\":0},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":0.0},\"sS\":{\"x\":0,\"y\":0,\"z\":0},\"sIi\":-1,\"sB\":[\"AxisMotionGroupBehaviourData:{\\\"savedStartPoint\\\":{\\\"x\\\":-70,\\\"y\\\":100,\\\"z\\\":110},\\\"savedEndPoint\\\":{\\\"x\\\":-130,\\\"y\\\":100,\\\"z\\\":110},\\\"savedCenterPoint\\\":{\\\"x\\\":-100,\\\"y\\\":100,\\\"z\\\":110}}\"],\"sIb\":[]},{\"sId\":14,\"sC\":[{\"sId\":15,\"sC\":[],\"sP\":{\"x\":-10,\"y\":120,\"z\":80},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":16,\"sC\":[],\"sP\":{\"x\":0,\"y\":120,\"z\":80},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]}],\"sP\":{\"x\":0,\"y\":0,\"z\":0},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":0.0},\"sS\":{\"x\":0,\"y\":0,\"z\":0},\"sIi\":-1,\"sB\":[\"AxisMotionGroupBehaviourData:{\\\"savedStartPoint\\\":{\\\"x\\\":10,\\\"y\\\":110,\\\"z\\\":100},\\\"savedEndPoint\\\":{\\\"x\\\":-10,\\\"y\\\":120,\\\"z\\\":100},\\\"savedCenterPoint\\\":{\\\"x\\\":-30,\\\"y\\\":130,\\\"z\\\":100}}\"],\"sIb\":[]},{\"sId\":17,\"sC\":[{\"sId\":18,\"sC\":[],\"sP\":{\"x\":-40,\"y\":100,\"z\":80},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":19,\"sC\":[],\"sP\":{\"x\":-50,\"y\":110,\"z\":80},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":20,\"sC\":[],\"sP\":{\"x\":-40,\"y\":120,\"z\":80},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":21,\"sC\":[],\"sP\":{\"x\":-30,\"y\":120,\"z\":80},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":22,\"sC\":[],\"sP\":{\"x\":-20,\"y\":110,\"z\":80},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":23,\"sC\":[],\"sP\":{\"x\":-30,\"y\":100,\"z\":80},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]}],\"sP\":{\"x\":0,\"y\":0,\"z\":0},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":0.0},\"sS\":{\"x\":0,\"y\":0,\"z\":0},\"sIi\":-1,\"sB\":[\"RotationGroupBehaviourData:{\\\"savedCenterOfRotation\\\":{\\\"x\\\":-50,\\\"y\\\":110,\\\"z\\\":80},\\\"savedAxisDirection\\\":{\\\"x\\\":-50,\\\"y\\\":130,\\\"z\\\":100}}\"],\"sIb\":[]}],\"sP\":{\"x\":0,\"y\":0,\"z\":0},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":0.0},\"sS\":{\"x\":0,\"y\":0,\"z\":0},\"sIi\":-1,\"sB\":[\"StaticGroupBehaviourData:{}\",\"StaticGroupBehaviourData:{}\",\"StaticGroupBehaviourData:{}\"],\"sIb\":[]}","sS":{"x":0.10000000149011612,"y":1.0,"z":0.0},"sE":{"x":0.0,"y":0.9000000357627869,"z":0.0}}
\ No newline at end of file
{"sJ":"{\"sId\":1,\"sC\":[{\"sId\":2,\"sC\":[],\"sP\":{\"x\":-20,\"y\":130,\"z\":80},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":3,\"sC\":[{\"sId\":4,\"sC\":[],\"sP\":{\"x\":-130,\"y\":100,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":5,\"sC\":[],\"sP\":{\"x\":-120,\"y\":100,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":6,\"sC\":[],\"sP\":{\"x\":-80,\"y\":100,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":7,\"sC\":[],\"sP\":{\"x\":-70,\"y\":100,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":8,\"sC\":[],\"sP\":{\"x\":-100,\"y\":110,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":9,\"sC\":[],\"sP\":{\"x\":-90,\"y\":120,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":10,\"sC\":[],\"sP\":{\"x\":-110,\"y\":120,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":11,\"sC\":[],\"sP\":{\"x\":-90,\"y\":100,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":12,\"sC\":[],\"sP\":{\"x\":-100,\"y\":100,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":13,\"sC\":[],\"sP\":{\"x\":-110,\"y\":100,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]}],\"sP\":{\"x\":0,\"y\":0,\"z\":0},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":0.0},\"sS\":{\"x\":0,\"y\":0,\"z\":0},\"sIi\":-1,\"sB\":[\"AxisMotionGroupBehaviourData:{\\\"savedStartPoint\\\":{\\\"x\\\":-70,\\\"y\\\":100,\\\"z\\\":110},\\\"savedEndPoint\\\":{\\\"x\\\":-130,\\\"y\\\":100,\\\"z\\\":110},\\\"savedCenterPoint\\\":{\\\"x\\\":-100,\\\"y\\\":100,\\\"z\\\":110}}\"],\"sIb\":[]},{\"sId\":14,\"sC\":[{\"sId\":15,\"sC\":[],\"sP\":{\"x\":-10,\"y\":120,\"z\":80},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":16,\"sC\":[],\"sP\":{\"x\":0,\"y\":120,\"z\":80},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]}],\"sP\":{\"x\":0,\"y\":0,\"z\":0},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":0.0},\"sS\":{\"x\":0,\"y\":0,\"z\":0},\"sIi\":-1,\"sB\":[\"AxisMotionGroupBehaviourData:{\\\"savedStartPoint\\\":{\\\"x\\\":10,\\\"y\\\":110,\\\"z\\\":100},\\\"savedEndPoint\\\":{\\\"x\\\":-10,\\\"y\\\":120,\\\"z\\\":100},\\\"savedCenterPoint\\\":{\\\"x\\\":-30,\\\"y\\\":130,\\\"z\\\":100}}\"],\"sIb\":[]},{\"sId\":17,\"sC\":[{\"sId\":18,\"sC\":[],\"sP\":{\"x\":-40,\"y\":100,\"z\":80},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":19,\"sC\":[],\"sP\":{\"x\":-50,\"y\":110,\"z\":80},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":20,\"sC\":[],\"sP\":{\"x\":-40,\"y\":120,\"z\":80},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":21,\"sC\":[],\"sP\":{\"x\":-30,\"y\":120,\"z\":80},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":22,\"sC\":[],\"sP\":{\"x\":-20,\"y\":110,\"z\":80},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":23,\"sC\":[],\"sP\":{\"x\":-30,\"y\":100,\"z\":80},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]}],\"sP\":{\"x\":0,\"y\":0,\"z\":0},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":0.0},\"sS\":{\"x\":0,\"y\":0,\"z\":0},\"sIi\":-1,\"sB\":[\"RotationGroupBehaviourData:{\\\"savedCenterOfRotation\\\":{\\\"x\\\":-50,\\\"y\\\":110,\\\"z\\\":80},\\\"savedAxisDirection\\\":{\\\"x\\\":-50,\\\"y\\\":130,\\\"z\\\":100}}\"],\"sIb\":[]},{\"sId\":24,\"sC\":[{\"sId\":25,\"sC\":[],\"sP\":{\"x\":-110,\"y\":130,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":26,\"sC\":[],\"sP\":{\"x\":-100,\"y\":130,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]},{\"sId\":27,\"sC\":[],\"sP\":{\"x\":-90,\"y\":130,\"z\":110},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0},\"sS\":{\"x\":10,\"y\":10,\"z\":10},\"sIi\":0,\"sB\":[],\"sIb\":[]}],\"sP\":{\"x\":0,\"y\":0,\"z\":0},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":0.0},\"sS\":{\"x\":0,\"y\":0,\"z\":0},\"sIi\":-1,\"sB\":[\"AxisMotionGroupBehaviourData:{\\\"savedStartPoint\\\":{\\\"x\\\":-70,\\\"y\\\":100,\\\"z\\\":140},\\\"savedEndPoint\\\":{\\\"x\\\":-50,\\\"y\\\":80,\\\"z\\\":140},\\\"savedCenterPoint\\\":{\\\"x\\\":-60,\\\"y\\\":90,\\\"z\\\":140}}\"],\"sIb\":[]}],\"sP\":{\"x\":0,\"y\":0,\"z\":0},\"sR\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":0.0},\"sS\":{\"x\":0,\"y\":0,\"z\":0},\"sIi\":-1,\"sB\":[\"StaticGroupBehaviourData:{}\",\"StaticGroupBehaviourData:{}\",\"StaticGroupBehaviourData:{}\"],\"sIb\":[]}","sS":{"x":0.10000000149011612,"y":1.0,"z":0.0},"sE":{"x":0.0,"y":0.9000000357627869,"z":0.0}}
\ No newline at end of file
No preview for this file type
using System;
using Creator.Controls.VRControls;
using UnityEngine.SceneManagement;
namespace Controls
{
public class SceneSwapperControl: IDisposable
{
private IRightHandControl _control;
private int _sceneToGoIdx;
public SceneSwapperControl(IRightHandControl control, int sceneToGoIdx)
{
_control = control;
_sceneToGoIdx = sceneToGoIdx;
_control.actionButtonPressed.onValueChange += ActionButtonPressedOnValueChange;
}
private void ActionButtonPressedOnValueChange(bool obj)
{
if(obj)
SceneManager.LoadScene(_sceneToGoIdx);
}
public void Dispose()
{
_control.actionButtonPressed.onValueChange -= ActionButtonPressedOnValueChange;
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 30df14fa04ae4f598febe2003a857e46
timeCreated: 1667300980
\ No newline at end of file
using System.Collections.Generic;
using Controls;
using Creator.Controls;
using Creator.Controls.VRControls;
using Creator.Groups;
......@@ -37,6 +38,8 @@ namespace Creator.Infrastructure
BindInstruments();
BindSignals();
Container.BindInterfacesTo<SceneSwapperControl>().AsSingle().WithArguments(1).NonLazy();
}
private void BindSettings()
......@@ -51,7 +54,7 @@ namespace Creator.Infrastructure
Container.Bind<LeftMenuData>().AsSingle();
Container.BindInterfacesAndSelfTo<LeftMenuHolder>().AsSingle().NonLazy();
Container.Bind<LeftMenuUI>().
Container.BindInterfacesAndSelfTo<LeftMenuUI>().
FromSubContainerResolve().
ByNewPrefabResourceInstaller<LeftMenuUiInstaller>("Creator/LeftMenu").
UnderTransform((context) => context.Container.Resolve<ILeftHandControl>().transform).
......@@ -78,15 +81,15 @@ namespace Creator.Infrastructure
Container.Bind<Duplicator>().AsSingle().NonLazy();
Container.Bind<Rotator>().AsSingle().NonLazy();
Container.Bind<UIWorker<IRightHandControl>>().AsSingle().NonLazy();
Container.Bind<InstrumentsManager>().AsSingle().NonLazy();
Container.BindInterfacesAndSelfTo<InstrumentsManager>().AsSingle().NonLazy();
}
private void BindUICircleSelector()
{
Transform parentForUICircleSelector = Container.Resolve<IRightHandControl>().transform;
UICircleSelector circleSelector = Instantiate(uiCircleSelectorPrefab, parentForUICircleSelector);
Container.Inject(circleSelector);
Container.Bind<UICircleSelector>().FromInstance(circleSelector).AsSingle();
Container.BindInterfacesAndSelfTo<UICircleSelector>().
FromComponentInNewPrefab(uiCircleSelectorPrefab).
UnderTransform(context => context.Container.Resolve<IRightHandControl>().transform).
AsSingle();
}
private void BindSignals()
......
......@@ -162,8 +162,7 @@ namespace Creator.Instruments
}
// get group id, it is written in name like "Item <id>"
string name = other.gameObject.name;
Debug.Log(name);
// if names dont start with "Item", then it is not a group
if(!name.StartsWith("Item"))
return;
......
......@@ -61,6 +61,8 @@ namespace Creator.UI.LeftMenu
_selfData.tabFacades.Clear();
_leftMenuUI.onCommandExecute -= LeftMenuUIOnCommand;
}
private void LeftMenuUIOnCommand(CommandType commandType)
......
......@@ -5,7 +5,7 @@ using Zenject;
namespace Creator.UI
{
public class UICircleSelector : MonoBehaviour
public class UICircleSelector : MonoBehaviour, IDisposable
{
[Serializable]
private class InstrumentOptions
......@@ -112,6 +112,7 @@ namespace Creator.UI
selectorActive = false;
_control.laserPointer.currentCollider.onValueChange += ControlsOnColliderChange;
_control.laserPointer.SetState(LaserPointer.State.Off);
}
public void HideCentralOption()
......@@ -241,5 +242,11 @@ namespace Creator.UI
_currentUICollider = null;
}
}
public void Dispose()
{
if(gameObject)
Destroy(gameObject);
}
}
}
......@@ -61,6 +61,7 @@ namespace Mechanics
joint.spring = 1000f;
joint.tolerance = 0.0001f;
joint.connectedBody = interactingToConnect.GetComponent<Rigidbody>();
joint.anchor = Vector3.zero;
connected = interactingToConnect;
}
......@@ -72,10 +73,7 @@ namespace Mechanics
private void RecalculateSpring()
{
float distance = (connected.transform.position + joint.connectedAnchor - _control.transform.position).magnitude;
Debug.Log("Distance");
float distance = (connected.transform.TransformPoint(joint.connectedAnchor) - _control.transform.position).magnitude;
joint.spring = distance != 0 ? Mathf.Min(_settings.jointForce / distance, _settings.jointMaxSpring) : _settings.jointMaxSpring;
}
......
using Controls;
using Creator.Controls;
using Creator.Controls.VRControls;
using LevelLoading;
......@@ -15,6 +16,7 @@ namespace PlayTestMode.Infrastructure
Container.BindInterfacesTo<Interactive<IRightHandControl>>().AsSingle();
Container.Bind<PlayModeGroupsLoader>().AsSingle();
Container.BindInterfacesTo<PlayModeMainController>().AsSingle();
Container.BindInterfacesTo<SceneSwapperControl>().AsSingle().WithArguments(0).NonLazy();
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment