附近的人
This commit is contained in:
1 parent
725b510748
commit
2fcd9b23fa
94 files changed
+7063
-2007
No files matched your search
@@ -21,7 +21,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
Material _material;
|
||||
[SerializeField]
|
||||
[Range(1, 10)]
|
||||
private float UpdateFrequency = 2;
|
||||
private float UpdateFrequency = 1;
|
||||
|
||||
private int _counter;
|
||||
|
||||
@@ -127,9 +127,9 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
Transform camreatra = Camera.main.transform;
|
||||
Vector3 viewPos = Camera.main.WorldToViewportPoint(position);
|
||||
Vector3 dir = (position - camreatra.position).normalized;
|
||||
Vector3 dir = (position - camreatra.localPosition).normalized;
|
||||
float dot = Vector3.Dot(camreatra.forward, dir);
|
||||
if (dot > -1 && viewPos.x > -1 && viewPos.x < 2 && viewPos.y > -1 && viewPos.y < 2)
|
||||
if (dot > -1 && viewPos.x >= -1 && viewPos.x <= 2 && viewPos.y >= -1 && viewPos.y <= 2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -182,7 +182,8 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
lineRender.SetWidth(0.2f, 0.2f);
|
||||
lineRender.SetVertexCount(dat.Count);
|
||||
lineRender.SetPositions(feat.Points[0].ToArray());
|
||||
//lineRender.numCapVertices = 90;
|
||||
lineRender.loop = false;
|
||||
//lineRender.numCapVertices = 90;
|
||||
float alpha = 1.0f;
|
||||
//Gradient gradient = new Gradient();
|
||||
//gradient.SetKeys(
|
||||
|
||||
Reference in new issue
Block a user