Created field bubble shields / propulsion, currently just a prototype with its own test scene
This commit is contained in:
Reinier Vens 2025-01-30 01:58:05 +00:00
commit c6ffcad3f1
213 changed files with 2145 additions and 1213 deletions

View file

@ -18,6 +18,7 @@ using static Unity.Mathematics.noise;
[RequireComponent( typeof( Camera ) )]
public class VolumeSampling : MonoBehaviour
{
public Transform GridMesh;
public Camera GridCamera;
public GameSettings Settings;
@ -48,6 +49,13 @@ public class VolumeSampling : MonoBehaviour
Shader.SetGlobalVector("_GridTransform", new Vector4(_gridTransform.position.x,_gridTransform.position.z,GridCamera.orthographicSize*2));
var environment = ActionGameManager.Instance?.CurrentEnvironment ?? Settings.DefaultEnvironment;
if (GridMesh != null)
{
GridMesh.gameObject.SetActive(environment.Grid.Enabled);
GridMesh.position = new Vector3(_gridTransform.position.x, environment.Grid.Offset, _gridTransform.position.z);
GridMesh.localScale = new Vector3(GridCamera.orthographicSize, 1, GridCamera.orthographicSize);
}
// Volumetric sampling parameters are used by several shaders
Shader.SetGlobalTexture("_NebulaSurfaceHeight", NebulaSurfaceHeight);

View file

@ -531,6 +531,7 @@ public class ZoneRenderer : MonoBehaviour
var distance = length(difference);
entityInstance.CompassIcon.gameObject.SetActive(
PerspectiveEntity.EntityInfoGathered.ContainsKey(entityInstance.Entity) &&
PerspectiveEntity.EntityInfoGathered[entityInstance.Entity] > Settings.GameplaySettings.TargetDetectionInfoThreshold &&
distance > _minimapDistance);
entityInstance.CompassIcon.transform.rotation = Quaternion.Euler(0, 0, Mathf.Atan2(difference.y, difference.x) * Mathf.Rad2Deg - 90);
@ -699,4 +700,4 @@ public class AsteroidBeltUI
_mesh.vertices = _vertices;
//_collider.sharedMesh = _mesh;
}
}
}