Commit 30a40c2e authored by Chae Ho Shin's avatar Chae Ho Shin

trajectory movement WIP

parent bc71de59
...@@ -649,7 +649,6 @@ MonoBehaviour: ...@@ -649,7 +649,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
square: {fileID: 934514725} square: {fileID: 934514725}
pathrenderer: {fileID: 948598108}
playercamera: {fileID: 1661408489} playercamera: {fileID: 1661408489}
velocityslider: {fileID: 260633610} velocityslider: {fileID: 260633610}
accelslider: {fileID: 1086622590} accelslider: {fileID: 1086622590}
...@@ -1013,6 +1012,7 @@ MonoBehaviour: ...@@ -1013,6 +1012,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0bf826b8a4774ba4b9c6a1cff6925667, type: 3} m_Script: {fileID: 11500000, guid: 0bf826b8a4774ba4b9c6a1cff6925667, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
beta: 0
alpha: {x: 0, y: 0, z: 0} alpha: {x: 0, y: 0, z: 0}
v: {x: 0, y: 0, z: 0} v: {x: 0, y: 0, z: 0}
orientation: {x: 0, y: 0, z: 0} orientation: {x: 0, y: 0, z: 0}
...@@ -1332,6 +1332,7 @@ MonoBehaviour: ...@@ -1332,6 +1332,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 9cbe363fdf02257478cb799cdf2190b3, type: 3} m_Script: {fileID: 11500000, guid: 9cbe363fdf02257478cb799cdf2190b3, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
beta: 0
alpha: {x: 0, y: 0, z: 0} alpha: {x: 0, y: 0, z: 0}
v: {x: 0, y: 0, z: 0} v: {x: 0, y: 0, z: 0}
orientation: {x: 0, y: 0, z: 0} orientation: {x: 0, y: 0, z: 0}
...@@ -1339,6 +1340,7 @@ MonoBehaviour: ...@@ -1339,6 +1340,7 @@ MonoBehaviour:
gamma: 1 gamma: 1
time: 0 time: 0
theobject: {fileID: 1320474661} theobject: {fileID: 1320474661}
background: {fileID: 1713675711}
--- !u!4 &739347347 --- !u!4 &739347347
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1351,6 +1353,7 @@ Transform: ...@@ -1351,6 +1353,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 1320474668} - {fileID: 1320474668}
- {fileID: 1713675712}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 2 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
...@@ -2557,6 +2560,7 @@ MonoBehaviour: ...@@ -2557,6 +2560,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0bf826b8a4774ba4b9c6a1cff6925667, type: 3} m_Script: {fileID: 11500000, guid: 0bf826b8a4774ba4b9c6a1cff6925667, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
beta: 0
alpha: {x: 0, y: 0, z: 0} alpha: {x: 0, y: 0, z: 0}
v: {x: 0, y: 0, z: 0} v: {x: 0, y: 0, z: 0}
orientation: {x: 0, y: 0, z: 0} orientation: {x: 0, y: 0, z: 0}
...@@ -3665,13 +3669,13 @@ Transform: ...@@ -3665,13 +3669,13 @@ Transform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1713675711} m_GameObject: {fileID: 1713675711}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 500, y: 500, z: 1} m_LocalScale: {x: 500, y: 500.00024, z: 1}
m_Children: m_Children:
- {fileID: 948598109} - {fileID: 948598109}
m_Father: {fileID: 1756789505} m_Father: {fileID: 739347347}
m_RootOrder: 0 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!64 &1713675713 --- !u!64 &1713675713
MeshCollider: MeshCollider:
...@@ -3748,8 +3752,7 @@ MonoBehaviour: ...@@ -3748,8 +3752,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: a937b7b15233ade4b8c2766ff3695fb7, type: 3} m_Script: {fileID: 11500000, guid: a937b7b15233ade4b8c2766ff3695fb7, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
Cone: {fileID: 1756789504} levelManager: {fileID: 279236944}
Levelmanager: {fileID: 279236944}
starttime: 0 starttime: 0
gamma: 1 gamma: 1
--- !u!1 &1751424968 --- !u!1 &1751424968
...@@ -3869,8 +3872,7 @@ Transform: ...@@ -3869,8 +3872,7 @@ Transform:
m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children: []
- {fileID: 1713675712}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 8 m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
......
...@@ -4,14 +4,12 @@ using UnityEngine; ...@@ -4,14 +4,12 @@ using UnityEngine;
public class BackgroundMovement : MonoBehaviour public class BackgroundMovement : MonoBehaviour
{ {
[SerializeField]
GameObject Cone;
bool grabbed = false; bool grabbed = false;
int cnt = 0; int cnt = 0;
double beta = 0.5f; // v/c double beta = 0.5f; // v/c
Vector3 alpha = new Vector3(0.1f, 0.0f, 0.0f); // proper acceleration Vector3 alpha = new Vector3(0.1f, 0.0f, 0.0f); // proper acceleration
Vector3 v; Vector3 v;
public LevelManager Levelmanager; public LevelManager levelManager;
public double starttime = 0.0f; public double starttime = 0.0f;
public double gamma = 1.0f; public double gamma = 1.0f;
Vector3 orientation; Vector3 orientation;
...@@ -26,11 +24,11 @@ public class BackgroundMovement : MonoBehaviour ...@@ -26,11 +24,11 @@ public class BackgroundMovement : MonoBehaviour
set set
{ {
if(value) if(value)
transform.parent = Cone.transform; transform.parent = levelManager.player.transform;
else else
{ {
transform.parent = null; transform.parent = null;
v = Levelmanager.player.v; v = levelManager.player.v;
} }
toggle = value; toggle = value;
...@@ -52,8 +50,8 @@ public class BackgroundMovement : MonoBehaviour ...@@ -52,8 +50,8 @@ public class BackgroundMovement : MonoBehaviour
} }
else else
{ {
transform.Translate((float)Constants.c * Vector3.up * Time.fixedDeltaTime * (float)Levelmanager.player.gamma, Space.World); // move up by 1 second transform.Translate((float)Constants.c * Vector3.up * Time.fixedDeltaTime * (float)levelManager.player.gamma, Space.World); // move up by 1 second
transform.Translate(v * Time.fixedDeltaTime * (float)Levelmanager.player.gamma, Space.World); transform.Translate(v * Time.fixedDeltaTime * (float)levelManager.player.gamma, Space.World);
} }
} }
} }
...@@ -193,29 +193,9 @@ public class FlatlandMovement : MonoBehaviour ...@@ -193,29 +193,9 @@ public class FlatlandMovement : MonoBehaviour
if (startv.magnitude > 0.0f) if (startv.magnitude > 0.0f)
{ {
deltav = Constants.BoostMatrix(startv) * deltav;
var deltavsize = Mathf.Sqrt((float)(deltav[1] * deltav[1] + deltav[2] * deltav[2]));
deltav = atmp / deltavsize * deltav;
deltav[0] = Constants.Gamma(atmp) * Constants.c;
deltav[1] *= Constants.Gamma(atmp);
deltav[2] *= Constants.Gamma(atmp);
deltav = Constants.BoostMatrix(-startv) * deltav; deltav = Constants.BoostMatrix(-startv) * deltav;
} }
else
{
var deltavsize = Mathf.Sqrt((float)(deltav[1] * deltav[1] + deltav[2] * deltav[2]));
deltav = atmp / deltavsize * deltav;
deltav[0] = Constants.Gamma(atmp) * Constants.c;
deltav[1] *= Constants.Gamma(atmp);
deltav[2] *= Constants.Gamma(atmp);
}
var tt = deltav[0] / Constants.c; var tt = deltav[0] / Constants.c;
Vector3 finaldeltav = new Vector3((float)(deltav[1] / tt), 0.0f, (float)(deltav[2] / tt)); Vector3 finaldeltav = new Vector3((float)(deltav[1] / tt), 0.0f, (float)(deltav[2] / tt));
......
...@@ -19,7 +19,7 @@ public class LogScaleSlider : MonoBehaviour ...@@ -19,7 +19,7 @@ public class LogScaleSlider : MonoBehaviour
public float GetLogScaleValue() public float GetLogScaleValue()
{ {
return (-1) * Mathf.Pow(10, slider.value * (-5)) + 1; return (-1) * Mathf.Pow(10, slider.value * (-4)) + 1;
} }
public void UpdateLogScaleText() public void UpdateLogScaleText()
...@@ -29,7 +29,7 @@ public class LogScaleSlider : MonoBehaviour ...@@ -29,7 +29,7 @@ public class LogScaleSlider : MonoBehaviour
public void UpdateValuebyVelocity(float v) public void UpdateValuebyVelocity(float v)
{ {
slider.value = Mathf.Log10(1 - v) * -(1.0f/5.0f); slider.value = Mathf.Log10(1 - v) * -(1.0f/4.0f);
} }
} }
...@@ -4,6 +4,8 @@ using UnityEngine; ...@@ -4,6 +4,8 @@ using UnityEngine;
using System.Linq; using System.Linq;
using UnityEngine.UI; using UnityEngine.UI;
using System; using System;
using MathNet.Numerics.LinearAlgebra;
using MathNet.Numerics.LinearAlgebra.Double;
public class PathRenderer : MonoBehaviour public class PathRenderer : MonoBehaviour
{ {
...@@ -197,13 +199,121 @@ public class PathRenderer : MonoBehaviour ...@@ -197,13 +199,121 @@ public class PathRenderer : MonoBehaviour
int i = 0; int i = 0;
var u = levelManager.player.v; var u = levelManager.player.v;
int tinterval = Constants.alphatinterval; int tinterval = Constants.alphatinterval;
VectorBuilder<double> V = Vector<double>.Build;
while (i <= finalPathNum) while (i <= finalPathNum)
{ {
Vector3 acceleration = new Vector3(square.GetNthPath(i).x, 0f, square.GetNthPath(i).y); Vector3 startpos = new Vector3(levelManager.player.transform.position.x, 0, levelManager.player.transform.position.z);
Vector3 dest = new Vector3(square.GetNthPath(i).x, 0f, square.GetNthPath(i).y);
Vector3 acceleration = dest.normalized;
var offsetstartpos = Background.transform.position; var v = square.GetPathVelocity(i);
var startpos = levelManager.player.transform.position;
var atmp = (float)(v * Constants.c);
double[] vtmp = { (atmp * (acceleration.x / acceleration.magnitude)), 0.0, (atmp * (acceleration.z / acceleration.magnitude)) };
double[] xtmp = { dest.magnitude / (v * Constants.c), dest.x, dest.z };
var deltavnaive = V.DenseOfArray(vtmp);
var deltaxnaive = V.DenseOfArray(xtmp);
double[] tmp = {Constants.c * Constants.Gamma(deltavnaive.L2Norm()),
deltavnaive[0] * Constants.Gamma(deltavnaive.L2Norm()),
deltavnaive[2] * Constants.Gamma(deltavnaive.L2Norm())};
var deltav = V.DenseOfArray(tmp);
Vector<double> deltax = deltaxnaive;
if (u.magnitude > 0.0f)
{
deltav = Constants.BoostMatrix(-u) * deltav;
deltax = Constants.BoostMatrix(-u) * deltaxnaive;
}
var tt = deltav[0] / Constants.c;
Vector3 finaldeltav = new Vector3((float)(deltav[1] / tt), 0.0f, (float)(deltav[2] / tt));
Vector3 finaldeltax = new Vector3((float)deltax[1], 0.0f, (float)deltax[2]);
levelManager.player.v = finaldeltav;
while(true)
{
var currentpos = new Vector3(levelManager.player.transform.position.x, 0, levelManager.player.transform.position.z);
var traveledpos = currentpos - startpos;
if (traveledpos.magnitude >= finaldeltax.magnitude)
{
break;
}
yield return new WaitForFixedUpdate();
}
/*
levelManager.player.alpha = new Vector3(0, 0, 0);
var v = square.GetPathVelocity(i);
var atmp = (float)(v * Constants.c);
double[] vtmp = { ((acceleration.x / acceleration.magnitude)), 0.0, ((acceleration.z / acceleration.magnitude)) };
var deltavnaive = V.DenseOfArray(vtmp);
double[] tmp = {Constants.c * Constants.Gamma(deltavnaive.L2Norm()),
deltavnaive[0] * Constants.Gamma(deltavnaive.L2Norm()),
deltavnaive[2] * Constants.Gamma(deltavnaive.L2Norm())};
var deltav = V.DenseOfArray(tmp);
if (u.magnitude > 0.0f)
{
deltav = Constants.BoostMatrix(u) * deltav;
var deltavsize = Mathf.Sqrt((float)(deltav[1] * deltav[1] + deltav[2] * deltav[2]));
deltav = atmp / deltavsize * deltav;
deltav[0] = Constants.Gamma(atmp) * Constants.c;
deltav[1] *= Constants.Gamma(atmp);
deltav[2] *= Constants.Gamma(atmp);
deltav = Constants.BoostMatrix(-u) * deltav;
}
else
{
var deltavsize = Mathf.Sqrt((float)(deltav[1] * deltav[1] + deltav[2] * deltav[2]));
deltav = atmp / deltavsize * deltav;
deltav[0] = Constants.Gamma(atmp) * Constants.c;
deltav[1] *= Constants.Gamma(atmp);
deltav[2] *= Constants.Gamma(atmp);
}
var tt = deltav[0] / Constants.c;
Vector3 finaldeltav = new Vector3((float)(deltav[1] / tt), 0.0f, (float)(deltav[2] / tt));
levelManager.player.v = finaldeltav;
var prevdistance = (dest
+ (new Vector3(Background.transform.position.x, 0, Background.transform.position.z))
- (new Vector3(levelManager.player.transform.position.x, 0, levelManager.player.transform.position.z)));
yield return new WaitForFixedUpdate();
while (true)
{
var distanceleft = (dest
+ (new Vector3(Background.transform.position.x, 0, Background.transform.position.z))
- (new Vector3(levelManager.player.transform.position.x, 0, levelManager.player.transform.position.z)));
if (distanceleft.magnitude - prevdistance.magnitude >= 0.0f)
break;
prevdistance = distanceleft;
yield return new WaitForFixedUpdate();
}*/
/*
var offsetstartpos = new Vector3(Background.transform.position.x, 0, Background.transform.position.z);
var startpos = new Vector3(levelManager.player.transform.position.x, 0, levelManager.player.transform.position.z);
acceleration = acceleration.normalized; acceleration = acceleration.normalized;
...@@ -220,11 +330,14 @@ public class PathRenderer : MonoBehaviour ...@@ -220,11 +330,14 @@ public class PathRenderer : MonoBehaviour
for (var j = 0; j < tinterval; ++j) for (var j = 0; j < tinterval; ++j)
{ {
var tmp = (dest
+ (new Vector3(Background.transform.position.x, 0, Background.transform.position.z))
- (new Vector3(levelManager.player.transform.position.x, 0, levelManager.player.transform.position.z)));
yield return new WaitForFixedUpdate(); yield return new WaitForFixedUpdate();
} }
levelManager.player.alpha = new Vector3(0, 0, 0); levelManager.player.alpha = new Vector3(0, 0, 0);
var offsetnewpos = Background.transform.position; var offsetnewpos = new Vector3(Background.transform.position.x, 0, Background.transform.position.z);
var newpos = levelManager.player.transform.position; var newpos = new Vector3(levelManager.player.transform.position.x, 0, levelManager.player.transform.position.z);
var posdiff = newpos - startpos; var posdiff = newpos - startpos;
var offset = offsetnewpos - offsetstartpos; var offset = offsetnewpos - offsetstartpos;
...@@ -233,8 +346,10 @@ public class PathRenderer : MonoBehaviour ...@@ -233,8 +346,10 @@ public class PathRenderer : MonoBehaviour
while(true) while(true)
{ {
var tmp = (square.GetDestPoint(i) + Background.transform.position - levelManager.player.transform.position); var tmp = (dest
if ((posdiff - tmp).magnitude < 0.01f) + (new Vector3(Background.transform.position.x, 0, Background.transform.position.z))
- (new Vector3(levelManager.player.transform.position.x, 0, levelManager.player.transform.position.z)));
if (tmp.magnitude - posdiff.magnitude < 0.0f)
break; break;
yield return new WaitForFixedUpdate(); yield return new WaitForFixedUpdate();
} }
...@@ -248,15 +363,20 @@ public class PathRenderer : MonoBehaviour ...@@ -248,15 +363,20 @@ public class PathRenderer : MonoBehaviour
yield return new WaitForFixedUpdate(); yield return new WaitForFixedUpdate();
} }
levelManager.player.alpha = new Vector3(0, 0, 0); levelManager.player.alpha = new Vector3(0, 0, 0);
*/
levelManager.player.v = u;
levelManager.player.transform.position = new Vector3(startpos.x + finaldeltax.x
, levelManager.player.transform.position.y
, startpos.z + finaldeltax.z);
Background.Toggle = true;
break;
i++; i++;
} }
Background.Toggle = true;
} }
public void DeletePathsAfterNthPath(int n) public void DeletePathsAfterNthPath(int n)
......
...@@ -8,6 +8,8 @@ public class PlayerMovement : FlatlandMovement ...@@ -8,6 +8,8 @@ public class PlayerMovement : FlatlandMovement
{ {
bool isinertial = true; bool isinertial = true;
public GameObject background;
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
...@@ -30,6 +32,15 @@ public class PlayerMovement : FlatlandMovement ...@@ -30,6 +32,15 @@ public class PlayerMovement : FlatlandMovement
{ {
base.FixedUpdate(); base.FixedUpdate();
if (v.magnitude > 0.0f)
{
Time.fixedDeltaTime = 0.02f / (float)Constants.Gamma(v.magnitude);
if (Time.fixedDeltaTime < 0.002f)
Time.fixedDeltaTime = 0.002f;
}
var prevup = transform.up; var prevup = transform.up;
var prevfor = transform.forward; var prevfor = transform.forward;
var prevorient = orientation; var prevorient = orientation;
...@@ -78,7 +89,7 @@ public class PlayerMovement : FlatlandMovement ...@@ -78,7 +89,7 @@ public class PlayerMovement : FlatlandMovement
} }
if (v.magnitude >= Constants.c) // if floating point errors makes object ftl if (v.magnitude >= Constants.c) // if floating point errors makes object ftl
v = v.normalized * (float)(0.999999f * Constants.c); v = v.normalized * (float)(0.999995f * Constants.c);
beta = v.magnitude / (float)Constants.c; beta = v.magnitude / (float)Constants.c;
...@@ -102,14 +113,20 @@ public class PlayerMovement : FlatlandMovement ...@@ -102,14 +113,20 @@ public class PlayerMovement : FlatlandMovement
var neworientation = (Quaternion.FromToRotation(Vector3.up, vt)) * orientation; var neworientation = (Quaternion.FromToRotation(Vector3.up, vt)) * orientation;
theobject.transform.rotation = Quaternion.LookRotation(neworientation, vt); theobject.transform.rotation = Quaternion.LookRotation(neworientation, vt);
if(background.GetComponent<BackgroundMovement>().Toggle)
background.transform.rotation = Quaternion.LookRotation(-vt, neworientation);
theobject.transform.parent = null; theobject.transform.parent = null;
if (background.GetComponent<BackgroundMovement>().Toggle)
background.transform.parent = null;
Vector3 newforward = new Vector3(vt.y * (v.x / v.magnitude), Mathf.Sqrt(vt.x * vt.x + vt.z * vt.z), vt.y * (v.z / v.magnitude)); Vector3 newforward = new Vector3(vt.y * (v.x / v.magnitude), Mathf.Sqrt(vt.x * vt.x + vt.z * vt.z), vt.y * (v.z / v.magnitude));
transform.rotation = Quaternion.LookRotation(newforward, vt); transform.rotation = Quaternion.LookRotation(newforward, vt);
theobject.transform.parent = transform; theobject.transform.parent = transform;
if (background.GetComponent<BackgroundMovement>().Toggle)
background.transform.parent = transform;
transform.localScale = new Vector3(1.0f, 1.0f, (float)gamma); // scale x'-axis scale (distance dilation) transform.localScale = new Vector3(1.0f, 1.0f, (float)gamma); // scale x'-axis scale (distance dilation)
......
...@@ -11,8 +11,6 @@ public class UIManager : MonoBehaviour ...@@ -11,8 +11,6 @@ public class UIManager : MonoBehaviour
[SerializeField] [SerializeField]
Square square; Square square;
[SerializeField] [SerializeField]
PathRenderer pathrenderer;
[SerializeField]
Camera playercamera; Camera playercamera;
[SerializeField] [SerializeField]
LogScaleSlider velocityslider; LogScaleSlider velocityslider;
...@@ -117,22 +115,22 @@ public class UIManager : MonoBehaviour ...@@ -117,22 +115,22 @@ public class UIManager : MonoBehaviour
if(Input.GetKeyDown("w")) if(Input.GetKeyDown("w"))
{ {
var tmp = accelslider.GetLogScaleValue() * (float)Constants.c * 10; var tmp = accelslider.GetLogScaleValue() * (float)Constants.c;
levelManager.player.alpha += new Vector3(0, 0, tmp); levelManager.player.alpha += new Vector3(0, 0, tmp);
} }
else if(Input.GetKeyDown("a")) else if(Input.GetKeyDown("a"))
{ {
var tmp = accelslider.GetLogScaleValue() * (float)Constants.c * 10; var tmp = accelslider.GetLogScaleValue() * (float)Constants.c;
levelManager.player.alpha += new Vector3(-tmp, 0, 0); levelManager.player.alpha += new Vector3(-tmp, 0, 0);
} }
else if(Input.GetKeyDown("s")) else if(Input.GetKeyDown("s"))
{ {
var tmp = accelslider.GetLogScaleValue() * (float)Constants.c * 10; var tmp = accelslider.GetLogScaleValue() * (float)Constants.c;
levelManager.player.alpha += new Vector3(0, 0, -tmp); levelManager.player.alpha += new Vector3(0, 0, -tmp);
} }
else if(Input.GetKeyDown("d")) else if(Input.GetKeyDown("d"))
{ {
var tmp = accelslider.GetLogScaleValue() * (float)Constants.c * 10; var tmp = accelslider.GetLogScaleValue() * (float)Constants.c;
levelManager.player.alpha += new Vector3(tmp, 0, 0); levelManager.player.alpha += new Vector3(tmp, 0, 0);
} }
...@@ -229,7 +227,7 @@ public class UIManager : MonoBehaviour ...@@ -229,7 +227,7 @@ public class UIManager : MonoBehaviour
public void PathCancel() public void PathCancel()
{ {
pathrenderer.DeletePathsAfterNthPath(prevSelectPathNum + 1); pathRenderer.DeletePathsAfterNthPath(prevSelectPathNum + 1);
_pathUI.SetActive(false); _pathUI.SetActive(false);
prevSelectPathNum = -1; prevSelectPathNum = -1;
} }
......
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